Create A Custom Security Group And Assign To An Instance

Create A Custom Security Group And Assign To An Instance

Create a custom security group and assign to an instance

Hello Everyone

Welcome to CloudAffaire and this is Debjeet

In the last blog post, we have discussed the Security Group.

https://cloudaffaire.com/security-groups/

In this blog post, we are going to create a custom security group and assign to EC2 instance.

Prerequisite for this demo:

  • One active AWS account
  • One running EC2 instance

Create a custom security group and assign to an instance:

Step 1: Login to AWS console and click ‘EC2’ under compute

Create a custom security group and assign to an instance

Step 2: Navigate to Security Groups located under NETWORK & SECURITY. Click ‘Create Security Group’.

Create a custom security group and assign to an instance

Step 3: Provide a name and description for the security group and click ‘Add Rule’. Provide rules for inbound traffic and click ‘Create’.

Create a custom security group and assign to an instance

Note: We are opening all ports up for all inbound traffic. This is for demo only. We can also define outbound rules for our security group in the same manner.

Our new security group has been created.

Create a custom security group and assign to an instance

Next, we are going to assign this new security group to an EC2 instance.

Step 4: Navigate to Instance located under INSTANCES and select the instance for which we want to assign this new security group. Click Actions > Networking > ‘Change Security Group’

Create a custom security group and assign to an instance

Step 5: Select the new security group and click ‘Assign Security Groups’

Create a custom security group and assign to an instance

New security group successfully assigned to the instance

Create a custom security group and assign to an instance

We will cover security groups rule configuration in details in EC2 instance security.

Hope you have enjoyed this blog post. In the next blog, we are going to discuss Elastic IP.

Leave a Reply

Close Menu