Shared responsibility

AWS secures the cloud; you secure what you put in it

CUSTOMER: security IN the cloudCustomer dataPlatform, applications, identity and access managementOperating system, network and firewall configurationClient-side data encryptionServer-side encryption (files, data)Network traffic protectionAWS: security OF the cloudSoftware: compute · storage · database · networkingHardware and AWS global infrastructureRegions · Availability Zones · edge locationsAWS secures the cloud itself. You secure what you put in it, and who can reach it.This is AWS's own diagram and the most-asked picture on the exam. AWS runs the buildings, hardware, network andthe software that provides the services. The customer owns everything above: data, identities, operating systemsand how services are configured. "OF the cloud" is AWS. "IN the cloud" is you.

AWS: security of the cloud. Customer: security in the cloud.

Shared responsibility · Going deeper

Inherited, shared and customer-specific controls

Kind of controlWhoExamples AWS givesInherited controlsAWS does it all; you inherit the resultphysical and environmental security of data centresShared controlsboth do it, each for their own layerpatch and configuration management, trainingCustomer-specific controlsyours alone, by how you buildzoning data, routing, service and communications protectionPatch management, as a shared controlAWS patchesthe infrastructure and the hypervisorYou patchyour guest operating systems and applicationsA shared control is not split in half: each side does the whole job for its own layer."Which is a shared control?" has three stock answers: patch management, configuration management, and awareness and training.

Shared controls: patch management, configuration management, awareness and training.

Responsibility by service

The more managed the service, the less is yours

Amazon EC2Amazon RDSAWS LambdaAmazon S3infrastructuremanagedserverlessserverlessYour data, and who can access itYouYouYouYouIdentity and permissions (IAM)YouYouYouYouApplication codeYouYouYounot applicableNetwork and firewall settingsYouYouAWSAWSGuest operating system patchesYouAWSAWSAWSDatabase or runtime patchesYouAWSAWSAWSHypervisor, hardware, buildingsAWSAWSAWSAWSThe line is not fixed. The more managed the service, the more of the column turns grey.On EC2 you patch the operating system. On RDS, AWS does. On Lambda there is no server for you to see. But the toptwo rows never change: your data and your permissions are yours on every service. When a question names aservice, first ask how managed it is.

The line moves with the service, but your data and your permissions are always yours.

Check yourself

Buildings and hardwareOperating system patchesDatabase engine patchesWho may connect, and with what password

A company runs a database on Amazon RDS. Which of these is still the company's responsibility?

The root user

It can do anything, so it should do almost nothing

Root userthe email thatopened the accountCan do everything, and cannot be restrictedIAM policies do not apply to it.Lock it away✓Turn on multi-factor authentication (MFA)✓Never create access keys for it; delete any that exist✓Use a strong, unique password✓Do not use it for everyday workUse it only for the few tasks that need it·Change the account name, root email or password·Close the AWS account·Restore a locked-out IAM administrator·Some billing and tax settings·Enable MFA Delete on an S3 bucketThe root user can do anything, so it should do almost nothing.Create an administrator in IAM Identity Center or IAM on day one and work as that. Keep root for the short list oftasks that only root can perform. Exam answers that involve using root for daily work, sharing its password, orcreating its access keys are always wrong.

Protect the root user with MFA, give it no access keys, and keep it for root-only tasks.

The root user · Going deeper

Tasks only the root user can do

Tasks that need the root userWhy only rootChange the account name, root email address or root passwordthey define the root identity itselfClose the AWS accountirreversible for the whole accountRestore IAM permissions when the only administrator is locked outnothing else is left with the power toActivate IAM access to the Billing console; some tax invoicesbilling authority starts at rootRegister as a seller in the Reserved Instance Marketplacea financial agreement by the account ownerEnable MFA Delete on S3; fix a bucket policy that denies everyonea last resort above all policiesSign up for AWS GovCloud (US)creates a linked accountYou need to recognise two or three of these, not recite them. Closing the account is the one asked most.In AWS Organizations, root access for member accounts can be managed centrally, so member accounts need noroot password at all. Source: IAM User Guide, "Tasks that require root user credentials".

Recognise the list: account details, closing the account, restoring an administrator.

IAM

Users, groups, roles and policies: only a policy grants anything

Group: DevelopersAshaBenChenIAM users: one per person,with long-term credentialsa group holds users, never other groupsPolicya JSON document:allow or deny actionson resourcesattached toattached toRoleno password, no keys:assumed for a whilean EC2 instance or Lambdaa user in another account,or a federated sign-inLeast privilege: only what the task needs, nothing moreIAM has four parts: users, groups, roles and policies. Only a policy grants anything.A user is a person or program with its own credentials. A group is a set of users that share policies. A role isan identity with no credentials of its own, which a trusted person or service assumes and gets temporary ones.Nothing is allowed until a policy says so. IAM itself is global and free.

Users are people, groups hold users, roles are assumed, and policies grant permissions.

IAM · Going deeper

Inside a policy

{  "Version": "2012-10-17",  "Statement": [{    "Effect": "Allow",    "Action": "s3:GetObject",    "Resource": "arn:aws:s3:::reports/*"  }]}EffectAllow or DenyActionwhich API calls, here reading an S3 objectResourceon what, here objects in the reports bucketHow a request is decided1 default deny · 2 an Allow permits · 3 an explicit Deny always winsAWS managed policywritten and kept up to date by AWSCustomer managed policywritten by you, reusableInline policyembedded in one identityYou never have to write a policy in this exam, only to know what one is and that an explicit Deny wins.Other policy types you may see named: resource-based policies (an S3 bucket policy) and service control policies inAWS Organizations, which set the ceiling for whole accounts.

Everything is denied by default; an Allow permits; an explicit Deny always wins.

Credentials

People use a password and MFA; programs on AWS use roles

A personPassword + MFAfor the Management ConsoleMFA adds a second proof: a codefrom a device you holdCLI or SDKAccess keyskey ID + secret key, long-livedRotate them; never put them incode; prefer short-lived sign-inCode on AWSAn IAM roletemporary, rotated automaticallyNo stored secret at all. The rightanswer for anything running on AWSOther secretsAWS Secrets Managerstores and rotates passwordsand API keysSystems ManagerParameter Store: configurationvalues and simple secretsPeople sign in with a password and MFA. Programs on AWS use roles, and store nothing.Long-lived access keys are the credential most often leaked. A role removes them. "Most secure way to give anEC2 instance access to S3" is always: attach an IAM role.

For code running on AWS, the answer is an IAM role: temporary credentials and nothing stored.

Credentials · Going deeper

Clue words for access management

When the question saysThe service isBecause it"sign in once to many AWS accounts"AWS IAM Identity Centerworkforce single sign-on, with permission sets"use our corporate directory"Federationtrust an external identity provider; no IAM users"access for someone in another account"Cross-account IAM rolethey assume it; temporary; nothing shared"a second factor"MFAauthenticator app, security key or hardware token"customers sign up to our app"Amazon Cognitoidentity for your application's users"enforce 14 characters and rotation"IAM password policyaccount-wide rules for IAM user passwords"store and rotate a database password"AWS Secrets Managerautomatic rotation"Microsoft Active Directory on AWS"AWS Directory Servicemanaged ADWorkforce identity is Identity Center. Customer identity is Cognito. The exam swaps them as distractors.Task statement 2.3 lists these as "authentication methods" and "types of identity management".

Identity Center for your workforce, Cognito for your customers.

Check yourself

EC2needs to readS3

An application on EC2 must read files from S3. Which arrangement is the most secure?

IAM Identity Center

One sign-in, and the right access in every account

Your staffidentities from your directoryone sign-inAWS IAM Identity Centerone portal, MFA onceAccount: Productionpermission set: ReadOnlyAccount: Developmentpermission set: PowerUserAccount: Securitypermission set: Auditaccounts in one AWS OrganizationIAM Identity Center gives each person one sign-in and the right role in every account.Without it, thirty accounts mean thirty sets of IAM users. With it, people keep their corporate identity, sign inonce, and receive temporary credentials for the accounts and permission sets assigned to them. It is therecommended way to give people access to AWS, and it was formerly called AWS Single Sign-On.

IAM Identity Center is single sign-on for your workforce across all your AWS accounts.

Check yourself

Root userMFAAccess keysDaily useIAM policy limits

Which statement about the root user is correct?

Lesson complete

You finished “Shared responsibility and your AWS account”

Answer the questions along the way to see your score here.

Open in a new tab