Sub topic 3
What you secure: your data, configuration, and access
This chapter assumes you know core AWS services (EC2, S3, IAM), Regions and Availability Zones, and basic security ideas such as encryption and least privilege. You should also be able to read a short AWS CLI command.
Security in the cloud
AWS secures the facilities, hardware, network, and virtualization layer. You secure what you put on top of them and how you set it up. This is called security in the cloud. AWS gives you the capability, and you decide whether to use it and how.
The customer side falls into three areas.
| Area | Your duty | Typical example |
|---|---|---|
| Data | Classify it, choose where it lives, and encrypt it | Turning on encryption for volumes and buckets |
| Configuration | Set up each resource safely | Blocking public access on S3 buckets |
| Access | Decide who and what can act on resources | Least-privilege IAM policies, MFA, short-lived credentials |
Configuration is your choice
S3 is operated by AWS, but whether a bucket is public depends on your settings. 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=trueThe four settings cover public ACLs and public bucket policies, both when you create them and when S3 evaluates them. If you skip this step, AWS does not stop you from making data public by mistake.
Data protection is your choice too
AWS provides the encryption capability and the key infrastructure. You decide to use it. This command makes new EBS volumes in a Region encrypted by default, and the second command confirms the setting:
aws ec2 enable-ebs-encryption-by-default --region us-east-1
aws ec2 get-ebs-encryption-by-default --region us-east-1The setting applies per Region. Repeat it in every Region you use.
Checking your side
You should verify that your configuration matches your intent. This command lists the AWS Config 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 problem. It does not mean you are secure, because it only covers the rules you have enabled.
Common errors
- Assuming a managed service is secured end to end. AWS patches the underlying service, but bucket policies, IAM permissions, and database credentials remain yours.
- Granting broad IAM permissions to get something working. A policy such as
"Action": "*"is a customer-side flaw, even though AWS enforced it correctly. - Configuring one Region and forgetting the rest. Defaults such as EBS encryption are set per Region.
- Not tracking changes. Without AWS Config or similar tools, configuration drift goes unnoticed.
- Leaving data unclassified. If you don't know which data is sensitive, you can't choose the right controls.
How the duty scales with the service
The more AWS manages, the less you configure, but the three areas never go away. On EC2 you also patch the guest operating system and configure the firewall rules. On S3 you configure access and encryption. Data and access remain yours in every case.
Exercise
A teammate says, "S3 is an AWS-managed service, so AWS is responsible if our bucket is exposed to the internet." Is that correct? Name the setting you would check first.
Show answer
No. AWS secures the S3 service itself, but whether a bucket is public comes from customer configuration (bucket policies, ACLs, and Block Public Access). Check the bucket's Block Public Access settings first, and enable all four with put-public-access-block.