Sub topic 6
Common misunderstandings and misconfigurations
This chapter assumes you know the basics of EC2, S3, and IAM, and that you can read a short AWS CLI command. It also assumes you have seen the split between security of the cloud and security in the cloud. Most real incidents come from a few repeated mistakes on the customer side of that line. This chapter lists them and shows how to fix each one.
Misunderstandings about where the line sits
Four wrong beliefs cause most of the trouble.
- "AWS secures my data because it runs the service." AWS runs S3, but it does not decide who can read your objects. You decide that through policies, ACLs, and Block Public Access.
- "A managed service means no customer duties." Even for abstracted services such as S3 or DynamoDB, you still own identity, data classification, encryption choices, and logging.
- "AWS compliance certification makes my workload compliant." AWS certifications cover the infrastructure. Your own configuration needs its own evidence.
- "Encryption is on, so I am done." AWS provides the encryption capability and the key infrastructure. Whether a resource uses it, and who may use the key, is your choice.
Misconfigurations that follow from them
The table maps each misunderstanding to the mistake it produces and the control that fixes it.
| Belief | Typical misconfiguration | Customer-side fix |
|---|---|---|
| AWS protects S3 buckets | Public bucket or permissive ACL | Block Public Access, least-privilege bucket policy |
| Managed means safe | Database reachable from `0.0.0.0/0` | Restrictive security groups, private subnets |
| AWS handles encryption | Unencrypted EBS volumes or snapshots | Encryption by default, KMS key policies |
| AWS handles patching | Unpatched guest OS on EC2 | Patch management, for example Systems Manager |
| Root and broad IAM are fine | Long-lived keys with `*` permissions | Least privilege, MFA, roles instead of users |
Notice the pattern. Each fix is a setting you control, not something AWS can change for you.
Fixing two common cases
S3 is operated by AWS, but whether a bucket is public is a configuration choice that belongs to you. This command turns on all four Block Public Access settings for one bucket.
aws s3api put-public-access-block \
--bucket amzn-s3-demo-bucket \
--public-access-block-configuration \
BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=trueFor block storage, AWS supplies the encryption feature, and you decide to use it. This command makes new EBS volumes in the Region encrypted by default, and the second command confirms it.
aws ec2 enable-ebs-encryption-by-default --region us-east-1
aws ec2 get-ebs-encryption-by-default --region us-east-1The setting is per Region and applies only to new volumes. Existing unencrypted volumes stay as they are until you copy them to encrypted ones.
Catching mistakes before attackers do
Misconfigurations tend to go unnoticed because nothing fails. The service works, so nobody looks. AWS Config rules check resources against a desired state. This command lists the rules that currently report non-compliant resources.
aws configservice describe-compliance-by-config-rule \
--compliance-types NON_COMPLIANTAn empty result means no rule is reporting a violation. It does not mean you are secure, because it only covers the rules you have enabled.
A habit that prevents most of these
For every service you use, ask two questions. What did AWS already secure for me? What setting is still mine to choose? If you cannot name an owner for a setting, that setting is the likely gap.
Exercise
A team stores customer files in S3 and says "AWS manages S3, so public exposure is AWS's problem." Which part of this is wrong, and which command or setting would you use to reduce the risk?
Show answer
S3's infrastructure is AWS's responsibility, but bucket access configuration belongs to the customer. Enable all four Block Public Access settings on the bucket, for example with aws s3api put-public-access-block, and use a least-privilege bucket policy. Then add an AWS Config rule to detect any later drift.
Exercise
You run aws configservice describe-compliance-by-config-rule --compliance-types NON_COMPLIANT and get no results. Why is that not proof that your workload is secure?
Show answer
The command only reports on Config rules you have enabled. Resources or risks not covered by any rule, such as an unpatched guest OS, will not appear.