Sub topic 6
Common misunderstandings and misconfigurations
This chapter assumes you know the split between security of the cloud and security in the cloud. It also assumes you know the three service categories (infrastructure, container, abstracted), can read a short AWS CLI command, and have worked with EC2, S3, and IAM. Here you will see where teams most often misread that split and how each mistake shows up as a real finding.
Most cloud breaches do not come from AWS failing to secure its side. They come from a customer-side setting that someone assumed AWS had handled. The mistakes below fall into a few groups: wrong beliefs about who owns a layer, defaults that are not what people remember, and drift over time.
Misunderstandings about who owns what
"AWS is certified, so my workload is compliant"
AWS holds attestations such as SOC 2, ISO 27001, and PCI DSS for the services and facilities it operates. Those cover security of the cloud. They do not cover your application, your IAM policies, or your data handling. An auditor will still ask you for evidence of your own controls. AWS Artifact gives you AWS's evidence, and you provide the rest.
"Managed service means no customer duties"
Moving from EC2 to RDS, Lambda, or S3 removes some duties but never all of them. The customer always keeps these:
- Data: what you store, how it is classified, and who may read it.
- Identity: which principals can call the service, and with what permissions.
- Configuration: public access, encryption choices, network exposure, retention, and logging.
The abstracted end of the spectrum has the fewest duties, but they are the ones that matter most for data exposure.
"AWS backs up my data, so I do not need backups"
AWS designs S3 and EBS for durability, which protects against hardware failure. It does not protect against your own DeleteObject call, a faulty deployment script, ransomware using stolen credentials, or a bad migration. Protection against those is a customer duty. Use versioning, S3 Object Lock, AWS Backup, cross-account copies, and tested restores.
"Patching is AWS's job"
The answer depends on the category:
| Service | AWS patches | You patch or decide |
|---|---|---|
| EC2 | Hypervisor, host hardware, firmware | Guest OS, packages, applications |
| RDS | Underlying host and database OS | Engine version upgrades, parameter groups, maintenance window, auto minor version upgrade setting |
| Lambda | Managed runtime and execution environment | Your code, third-party libraries, choice of runtime version |
| S3 | Everything in the service | Nothing to patch; configuration only |
Teams often discover too late that an EC2 instance launched from a two-year-old AMI has never been patched. AWS does not touch the guest OS.
Misunderstandings about defaults
"Encryption is on, so the data is safe"
Since early 2023, S3 applies server-side encryption with S3-managed keys (SSE-S3) to new objects. That protects against someone reading the raw disks. It does nothing against an over-broad bucket policy, because S3 decrypts transparently for any authorized caller. Encryption at rest answers a different question from "who may read this?".
EBS is different. New EBS volumes are not encrypted unless you ask for it, or enable account-level default encryption per Region. Because the setting is per Region, enabling it in us-east-1 does nothing in eu-west-1.
aws ec2 enable-ebs-encryption-by-default --region us-east-1
aws ec2 get-ebs-encryption-by-default --region us-east-1The second command should print "EbsEncryptionByDefault": true. Repeat both commands for every Region you use.
"Defaults changed, so my old resources are safe"
New S3 buckets now block public access and disable ACLs by default. That does not change buckets created years ago. Older buckets keep whatever configuration they had. Defaults protect new resources, and your existing estate needs an audit.
aws s3api put-public-access-block \
--bucket amzn-s3-demo-bucket \
--public-access-block-configuration \
BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=trueTo verify the result on a bucket, read it back:
aws s3api get-public-access-block --bucket amzn-s3-demo-bucketYou can also set the same four options for a whole account with aws s3control put-public-access-block, which gives a safety net for buckets you have not reviewed.
"The default VPC and default security group are fine for production"
The default security group allows all traffic between members of the group. Default subnets in the default VPC assign public IPv4 addresses. Neither is wrong for experiments, but both make it easy to expose something without meaning to. Production workloads should use their own VPC, explicit security groups, and deliberate subnet design.
Common misconfigurations
Open administrative ports
A security group rule that allows 0.0.0.0/0 on port 22 or 3389 is one of the most common findings. AWS operates the virtual firewall, but the rules are yours. This command lists the groups that expose SSH to the internet:
aws ec2 describe-security-groups \
--filters Name=ip-permission.cidr,Values=0.0.0.0/0 \
Name=ip-permission.from-port,Values=22 \
Name=ip-permission.to-port,Values=22 \
--query 'SecurityGroups[].[GroupId,GroupName]' \
--output tableThe filter matches rules whose range is exactly port 22. A rule that opens ports 0 to 65535 will not match this filter, so check for wide ranges separately. The better fix is to remove inbound administrative access and use AWS Systems Manager Session Manager.
Publicly accessible databases
RDS has a PubliclyAccessible setting. When it is true and the security group permits the source, the database endpoint is reachable from the internet. AWS secures the database host, but it cannot know that you meant the database to be private.
Long-lived access keys and unprotected root
Common identity mistakes include:
- Using the root user for daily work, or leaving it without MFA.
- Creating IAM user access keys for workloads that could use IAM roles.
- Committing keys to a repository.
- Granting
AdministratorAccessor"Action": "*"because a narrower policy was inconvenient.
AWS protects the IAM service. It does not decide how much power you hand out.
Missing or short-lived logs
CloudTrail event history shows 90 days of management events in each Region. If your compliance rules require a year, or you need data events such as S3 object reads, you must create a trail and deliver it to a protected bucket. Nobody does this for you, and you cannot investigate an incident from logs that were never kept.
Overly broad cross-account or public trust
Resource policies on S3 buckets, KMS keys, SQS queues, and IAM role trust policies can all name "Principal": "*". This is sometimes intended, but without a restricting condition such as aws:PrincipalOrgID it grants access to everyone.
A way to triage a finding
When a finding appears, ask who operates the layer where the problem sits.
Nearly every public exposure lands in the second branch. If you find yourself in the first branch, check that you are not blaming AWS for something an IAM policy or security group controls.
Catching drift with AWS Config
A one-time fix does not last, because someone will eventually create a new bucket or open a port during an incident. AWS Config evaluates resources continuously against rules. It requires a configuration recorder to be running in the Region.
This command adds an AWS managed rule that flags S3 buckets allowing public reads:
aws configservice put-config-rule --config-rule '{
"ConfigRuleName": "s3-bucket-public-read-prohibited",
"Source": {
"Owner": "AWS",
"SourceIdentifier": "S3_BUCKET_PUBLIC_READ_PROHIBITED"
}
}'To see what is currently failing:
aws configservice describe-compliance-by-config-rule \
--compliance-types NON_COMPLIANTOther managed rules that map to the mistakes above include restricted-ssh (identifier INCOMING_SSH_DISABLED), rds-instance-public-access-check, root-account-mfa-enabled, and ec2-ebs-encryption-by-default. Config detects problems and does not fix them unless you attach remediation.
Summary table
| Belief | What is actually true | Control to apply |
|---|---|---|
| AWS certification covers my app | It covers AWS's layers only | Gather your own evidence; use Artifact for AWS's |
| Managed means no duties | Data, identity, and configuration stay with you | Review each managed service for those three |
| Durable means backed up | Durability does not protect against deletion or corruption | Versioning, AWS Backup, restore tests |
| Encrypted means private | Encryption does not limit authorized readers | Tight policies and Block Public Access |
| New defaults protect everything | Defaults apply to new resources | Audit existing buckets and volumes |
| Logs exist automatically | Event history lasts 90 days and excludes data events | Create trails with proper retention |
Exercise
A new S3 bucket contains customer records. A colleague says the bucket is safe because AWS encrypts it by default and AWS blocks public access on new buckets. Name two ways customer data could still be exposed, and say who is responsible for each.
Show answer
First, an over-broad bucket policy or IAM policy could grant read access to unintended principals, such as "Principal": "*" without conditions. Default encryption does not prevent this, because S3 decrypts for any authorized caller. Second, someone could turn off Block Public Access and add a public policy or ACL, or an overly privileged role or leaked access key could read the data. In both cases the customer is responsible, because these are configuration, identity, and data-handling choices. AWS is responsible only for the S3 service itself.
Exercise
You enabled EBS encryption by default in us-east-1 and your audit tool still reports unencrypted new volumes in eu-west-1. What explains this, and how would you confirm and fix it?
Show answer
The setting is per Region, so enabling it in us-east-1 does not affect eu-west-1. Confirm with aws ec2 get-ebs-encryption-by-default --region eu-west-1, which should show false. Fix it with aws ec2 enable-ebs-encryption-by-default --region eu-west-1, and repeat for every Region you use. Existing unencrypted volumes stay unencrypted, so you must also copy them through an encrypted snapshot to replace them.