Shared responsibility and IAM
Say who is responsible for what in the shared responsibility model, and secure an AWS account with IAM users, roles, policies and MFA.
16 min
Security on AWS is a partnership called the shared responsibility model.
- *AWS is responsible for security of the cloud*: the physical data centers, the hardware, the network, and the software that runs the core services (the hypervisor, for example).
- *You are responsible for security in the cloud*: your data, who can access it (identity and access), the guest operating system and applications you install, network and firewall configuration, and encryption choices.
The split shifts with the service. With Amazon EC2 you manage the guest OS, including patches. With a managed service such as Amazon RDS, AWS patches the database software, but you still control access and the data. With a fully managed service such as S3, you mostly manage the data, the permissions and the encryption settings.
Inherited controls (physical and environmental security) come entirely from AWS. Shared controls (patch management, configuration management, awareness and training) apply to both sides in different ways.
The model in one picture: you above the line, AWS below it.
Who patches what?
Amazon EC2
- AWS patches
- The host and hypervisor
- You patch
- The guest operating system and your applications
Amazon RDS
- AWS patches
- The database engine and the OS under it
- You patch
- Nothing in the OS. You manage access, parameters and data
AWS Lambda
- AWS patches
- The runtime environment and servers
- You patch
- Your function code and its permissions
Amazon S3
- AWS patches
- The storage system
- You patch
- Bucket policies, encryption settings, the data itself
AWS Identity and Access Management (IAM) controls who can do what. It is free and global.
- Root user: the account owner, created with the email you signed up with. It can do everything. Protect it with MFA, do not use it for daily work, and do not create access keys for it.
- IAM users: individual people or applications with long-term credentials.
- IAM groups: a set of users that share permissions.
- IAM roles: a set of permissions assumed temporarily by a user, an AWS service (for example an EC2 instance) or another account. No long-term password or key is stored.
- IAM policies: JSON documents that allow or deny actions on resources. By default everything is denied. An explicit deny always wins.
Follow least privilege: give only the permissions needed for the task. Turn on multi-factor authentication (MFA) for the root user and for all users. For workforce sign-in across many accounts, use IAM Identity Center.
The first things to do with a new AWS account:
Secure the root user
Enable MFA on the root user and store the credentials safely. Do not create root access keys.
Create an admin identity for daily work
Use IAM Identity Center or an IAM user with administrative permissions, not the root user.
Use groups and roles
Attach permissions to groups or roles, not to individual users. Applications on EC2 use a role.
Apply least privilege
Start with the smallest policy that works and widen it only when needed.
Turn on logging
Enable AWS CloudTrail so every API call is recorded.
“AWS is responsible for securing my data because it is stored on AWS.”
AWS runs the infrastructure and has strong security.
What is actually true
You own your data and who can reach it. AWS secures the infrastructure, but a misconfigured bucket or a leaked access key is the customer's responsibility.
How to catch yourself
If the question is about configuration, permissions or data classification, the answer is usually the customer.
- AWS secures the cloud itself. You secure what you put in it.
- Responsibility shifts with the service: more with EC2, less with managed and serverless services.
- Root user: MFA on, no access keys, not for daily use.
- IAM policies deny by default, an explicit deny wins, and roles give temporary access.
Who owns it, and which IAM tool fits?
Who is responsible for patching the guest operating system on an Amazon EC2 instance?
- AAWS
- BThe customer
- CThe Region's administrator
- DBoth equally
Who is responsible for the physical security of AWS data centers?
- AThe customer for their own racks
- BAWS
- CThe customer
- DA third-party auditor
An application running on EC2 needs to read from S3 without storing access keys on the instance. What should you use?
- AAn IAM role attached to the instance
- BA shared IAM user password
- CA public bucket policy
- DThe root user's access keys
Which TWO actions are best practices for the root user?
- AAvoid using it for daily tasks
- BUse it for everyday administration
- CDisable CloudTrail
- DEnable MFA
- ECreate access keys and share them with the team
An IAM policy has an Allow for an action and another policy has an explicit Deny for the same action. What is the result?
- AThe action is allowed
- BIt depends on which policy is newer
- CThe action is allowed only on weekdays
- DThe action is denied
Practise this lesson, not just read it
In BiliMind the questions above are marked when you answer, the flashcards come back on a schedule, and the rest of AWS Certified Cloud Practitioner (CLF-C02) is planned around your week. Free.