Authentication
SCS-C03 · Lesson 14 of 22 · 2:03:22
YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗
Learning with these videos? Subscribe for new courses and exam-style questions.
Subscribe on YouTube (opens in a new tab)In this lesson
Prepare for the SCS-C03 exam (AWS Certified Security – Specialty). In this lesson: IAM Identity Center for the workforce (SCIM, SAML, permission sets, phishing-resistant MFA), Amazon Cognito user pools and identity pools for customers, temporary credentials with AWS STS, role chaining, presigned URLs, and troubleshooting authentication with CloudTrail sign-in events, trust policies, and permission sets. Includes three original practice questions.
Study notes
The text of this lesson, to read at your own pace. Information as of November 2026.
Three kinds of identities
At AnyCompany Health, three kinds of identities sign in: staff who manage AWS accounts, patients who use the mobile app, and workloads that call AWS APIs. Each kind needs its own way to prove who it is, and none of them should rely on long-term keys. This lesson covers workforce identities, customer identities, temporary credentials, and how to troubleshoot a failed sign-in.
Workforce access with IAM Identity Center
IAM Identity Center connects your workforce to AWS accounts and applications, with users from an external identity provider, from Active Directory through AWS Directory Service, or created in Identity Center itself. With an external identity provider, users and groups are provisioned automatically with SCIM, and users sign in through SAML. A permission set is a template of IAM policies: when you assign it to a group in an account, Identity Center creates a role in that account, with a session duration of one hour by default, and up to twelve hours. Require MFA, and prefer phishing-resistant factors, such as passkeys and security keys, which use public key cryptography. For Active Directory, AD Connector forwards directory requests without caching anything in the cloud, while AWS Managed Microsoft AD runs domain controllers in your VPC and can trust your own domains.
Customer identities with Amazon Cognito
Patients are not your workforce: an Amazon Cognito user pool is a user directory for web and mobile apps, and it acts as an OpenID Connect identity provider, with sign-in through social or enterprise providers as well. A user pool can require MFA, with text messages, email messages, or authenticator apps, and adaptive authentication asks for another factor only when the sign-in looks risky. An identity pool exchanges a token for temporary AWS credentials through IAM roles, one for signed-in users, and a more restricted one for guests. The trust policy of those roles must check the audience of the token, which is the ID of the identity pool, so that no other pool can use them.
Temporary credentials
AWS STS issues temporary credentials: AssumeRole returns an access key, a secret key, and a session token that expire, after one hour by default, and at most after the maximum session duration of the role, up to twelve hours. When a role session assumes another role, which is called role chaining, the new session lasts one hour at most. For a vendor that assumes a role in your account, the trust policy can require an external ID, so that only that vendor can use the role. Workloads get temporary credentials without stored keys: EC2 through its instance profile, Lambda and ECS through their roles, and servers outside AWS through IAM Roles Anywhere. And for one object, an S3 presigned URL gives access for a limited time to anyone with the link, up to seven days when IAM user keys sign it, and never longer than the credentials that sign it.
Troubleshooting authentication
When a sign-in fails, start with CloudTrail: a console sign-in creates a ConsoleLogin event, which shows Failure and the message Failed authentication when the password is wrong, and a field that shows whether MFA was used. The Region of a ConsoleLogin event depends on the type of user and on the sign-in endpoint, so search a trail that covers all Regions. A failed AssumeRole call shows AccessDenied, which often means that the trust policy of the role does not trust the caller, or that a required condition, such as the external ID or MFA, is missing. With Identity Center, the roles whose names start with AWS Reserved SSO are protected: you change them by editing the permission set, and SCIM errors usually come from attributes that are duplicated or in the wrong format. For Cognito, check the token: an identity pool role whose audience condition names a different identity pool rejects every user.
Recap
Let's recap. IAM Identity Center serves the workforce, with SCIM, SAML, permission sets, and phishing-resistant MFA. Cognito user pools sign customers in, and identity pools give them temporary credentials. STS issues temporary credentials, role chaining is limited to one hour, and presigned URLs never outlive the credentials that sign them. And CloudTrail sign-in events, trust policies, and permission sets explain most authentication failures.
Quick checks for this lesson
The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.
The patient app must sign patients in with their email address or Google account, ask for a second factor only when a sign-in looks risky, then let the app upload photos to S3 with temporary credentials. What should the team use?
- A Cognito user pool and an identity pool
- IAM Identity Center with an external IdP
- An IAM user per patient, with access keys
- AWS Managed Microsoft AD with MFA
Show the answer
A Cognito user pool and an identity pool
The user pool signs patients in, with Google as an identity provider and adaptive MFA, and the identity pool exchanges their token for temporary AWS credentials. “IAM Identity Center with an external IdP” is for the workforce, not for customers. “An IAM user per patient, with access keys” would put long-term keys on every phone. And “AWS Managed Microsoft AD with MFA” is a directory for the workforce and Windows workloads, not for app users.
A Lambda function creates presigned URLs for lab reports and sets them to expire after 24 hours. Patients say that the links stop working after a few hours. What is the most likely cause?
- S3 caps every presigned URL at one hour
- The bucket blocks all public access
- SSE-KMS encryption on the report objects
- The role session that signed them ended
Show the answer
The role session that signed them ended
A presigned URL is never valid longer than the credentials that sign it, so a URL signed with role credentials expires when that session ends. “S3 caps every presigned URL at one hour” is wrong, because with IAM user keys, a presigned URL can last up to seven days. “The bucket blocks all public access” blocks public access, and a presigned URL is a request signed by an identity of the account. And “SSE-KMS encryption on the report objects” would not shorten the link, as long as the signer can use the key.
An administrator tries to change the policy of a role named AWSReservedSSO_DatabaseAdmin in a member account, and the IAM console refuses the change. How should the change be made?
- Use the root user of the member account
- Edit the permission set in Identity Center
- Add an SCP that allows the change
- Recreate the role with the same name
Show the answer
Edit the permission set in Identity Center
These roles belong to IAM Identity Center, which updates them in every assigned account when you change the permission set. “Use the root user of the member account” would not help, because only Identity Center can change a protected role. “Add an SCP that allows the change” is not possible, because an SCP never grants permissions. And “Recreate the role with the same name” would hit the same protection as the change itself.