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
Step 2: Navigate to Security Groups located under NETWORK & SECURITY. Click ‘Create Security Group’.
Step 3: Provide a name and description for the security group and click ‘Add Rule’. Provide rules for inbound traffic and click ‘Create’.
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.
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’
Step 5: Select the new security group and click ‘Assign Security Groups’
New security group successfully assigned to the 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.