S3 Bucket Public Access Block

Learning Outcome: Access control and public exposure prevention.

✅ Step 1: Launched a Non-Compliant EC2 Instance (No Key Pair)

  1. Opened the EC2 Console
  2. Clicked Launch Instance
  3. Gave the instance a name
  4. Selected an AMI (Ubuntu)
  5. Choose an instance type - t2.micro, because it’s a free tier
  6. Left Key pair (login) as “Proceed without a key pair”
  7. Configured storage, security group, and launched the instance
  8. The instance launched successfully — but no SSH access was possible since no key pair was attached

                           Screenshot showing the process of creating the EC2 instance without a keypair

                       **Screenshot showing the process of creating the EC2 instance without a keypair**

✅ Step 2: Added the AWS Config Rule – ec2-no-amazon-keypair

  1. In AWS Config, navigated to Rules > Add Rule
  2. Searched for ec2-no-amazon-keypair
  3. Selected the rule and clicked Next
  4. Left all parameters as default and clicked Add Rule

                                  Screenshot showing the creation of the ec2-no-amazon-keypair-rule

                              **Screenshot showing the creation of the ec2-no-amazon-keypair-rule**