{"id":7675,"date":"2024-02-02T20:26:51","date_gmt":"2024-02-02T14:56:51","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=7675"},"modified":"2024-02-02T20:28:51","modified_gmt":"2024-02-02T14:58:51","slug":"how-to-replace-a-security-group-of-an-ec2-instance-in-aws","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/how-to-replace-a-security-group-of-an-ec2-instance-in-aws\/","title":{"rendered":"How to replace a security group of an EC2 instance  in AWS"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Introduction<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A security group\u00a0controls the traffic that is allowed to reach and leave the instance. It is a set of IP filter rules that define how to handle incoming (ingress) and outgoing (egress) traffic to both the public and private interfaces of an instance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Prerequisites<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>AWS root\/IAM access<\/li>\n\n\n\n<li>List of rules that need to be associated with  the instance <\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Implementation<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Step 1: Log into the AWS account,  and select the EC2 service from the search bar<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.06.56-PM.png\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"377\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.06.56-PM-1024x377.png\" alt=\"\" class=\"wp-image-7676\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.06.56-PM-1024x377.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.06.56-PM-300x110.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.06.56-PM-768x282.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.06.56-PM-816x300.png 816w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.06.56-PM.png 1256w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Step 2: Navigate to the Network &amp; Security  &gt;&gt; Security group and click on &#8220;create security group&#8221; to create a new one <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.10.46-PM.png\"><img decoding=\"async\" width=\"392\" height=\"360\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.10.46-PM.png\" alt=\"\" class=\"wp-image-7677\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.10.46-PM.png 392w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.10.46-PM-300x276.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.10.46-PM-327x300.png 327w\" sizes=\"(max-width: 392px) 100vw, 392px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Step 3: Add the required inbound and outbound rules by clicking on &#8220;add rule&#8221;. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.02-PM.png\"><img decoding=\"async\" width=\"1024\" height=\"305\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.02-PM-1024x305.png\" alt=\"\" class=\"wp-image-7678\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.02-PM-1024x305.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.02-PM-300x89.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.02-PM-768x229.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.02-PM-1536x457.png 1536w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.02-PM-2048x610.png 2048w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.02-PM-850x253.png 850w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Step 4: Click on Create Security Group<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.56-PM.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"214\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.56-PM-1024x214.png\" alt=\"\" class=\"wp-image-7679\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.56-PM-1024x214.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.56-PM-300x63.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.56-PM-768x160.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.56-PM-1536x321.png 1536w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.56-PM-2048x427.png 2048w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.12.56-PM-850x177.png 850w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Step 5: Navigate to the instance and select the instance that needs to replace the security group<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.14.23-PM.png\"><img loading=\"lazy\" decoding=\"async\" width=\"458\" height=\"552\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.14.23-PM.png\" alt=\"\" class=\"wp-image-7680\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.14.23-PM.png 458w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.14.23-PM-249x300.png 249w\" sizes=\"(max-width: 458px) 100vw, 458px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Step 6: Click on Actions and navigate to Security &gt;&gt; Change Security Group<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.15.41-PM-1.png\"><img loading=\"lazy\" decoding=\"async\" width=\"798\" height=\"564\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.15.41-PM-1.png\" alt=\"\" class=\"wp-image-7682\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.15.41-PM-1.png 798w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.15.41-PM-1-300x212.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.15.41-PM-1-768x543.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.15.41-PM-1-424x300.png 424w\" sizes=\"(max-width: 798px) 100vw, 798px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"> Step 7: Search for the required security group name in the Associated security groups and click on &#8220;Add security group&#8221;. Remove the existing security group by clicking on the &#8220;remove&#8221; option<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.21.15-PM.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"191\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.21.15-PM-1024x191.png\" alt=\"\" class=\"wp-image-7683\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.21.15-PM-1024x191.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.21.15-PM-300x56.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.21.15-PM-768x143.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.21.15-PM-1536x286.png 1536w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.21.15-PM-850x158.png 850w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/Screen-Shot-2024-02-02-at-8.21.15-PM.png 1558w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Step 8: Finally save the changes<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/image.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"458\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/image-1024x458.png\" alt=\"\" class=\"wp-image-7684\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/image-1024x458.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/image-300x134.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/image-768x344.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/image-1536x688.png 1536w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/image-670x300.png 670w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2024\/02\/image.png 1626w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"> <\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><br> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction A security group\u00a0controls the traffic that is allowed to reach and leave the instance. It is a set of [&hellip;]<\/p>\n","protected":false},"author":495,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1019],"tags":[985],"class_list":["post-7675","post","type-post","status-publish","format-standard","hentry","category-cloud-aws","tag-security-group","psol-cat-cloud-aws"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1ZN","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7675","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/495"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=7675"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/7675\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=7675"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=7675"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=7675"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}