Topic 1 Question #2
HOTSPOT -
A company is building a web application that needs to authenticate external users across multiple microservices that the company hosts on Amazon Elastic Container Service (Amazon ECS). The solution must use temporary credentials and minimize the management overhead required to maintain user databases.
Select and order the correct steps from the following list to implement a secure authentication strategy that meets these requirements. Select each step one time or not at all.
Configure Amazon Cognito user pools for user authentication.
Set up an IAM role for each microservice. Grant each role appropriate permissions.
Implement an Amazon API Gateway HTTP API with AWS Lambda authorizers to validate tokens before forwarding requests to microservices.
Create an Amazon DynamoDB table to store user credentials for each microservice.
Create an Amazon Cognito application client to interact with the web application.
Set up AWS IAM Identity Center to give users access to the microservices.

" target="_blank" rel="nofollow noopener">https://img.examtopics.com/aws-certified-security-specialty-scs-c03/image5.png">
Answer: B
The scenario requires an authentication strategy for external web application users, with temporary credentials and minimal user database management overhead. The correct ordered implementation steps are as follows:
1. Configure Amazon Cognito user pools for user authentication. Cognito user pools provide a fully managed external user identity store, eliminating the need to build and maintain custom user databases, which directly meets the minimal management overhead requirement.
2. Create an Amazon Cognito application client to interact with the web application. The app client is a required entity that represents the web application in the Cognito user pool, enabling OIDC/OAuth 2.0 authentication flows and token issuance to authenticated users.
3. Implement an Amazon API Gateway HTTP API with AWS Lambda authorizers to validate tokens before forwarding requests to microservices. The Lambda authorizer validates JWT tokens issued by Cognito, and generates temporary, time-bound IAM policies to grant access to backend ECS microservices, fulfilling the temporary credentials requirement.
4. Set up an IAM role for each microservice. Grant each role appropriate permissions. These least-privilege IAM roles define the permissions each ECS-hosted microservice needs to operate, and enforce access controls to ensure only validated requests from API Gateway can invoke the microservices.
The two excluded options are invalid for this use case: creating a DynamoDB table for user credentials introduces unnecessary custom user database management overhead, and AWS IAM Identity Center is designed for internal workforce identity management, not external customer authentication for public web applications. This solution aligns with the Identity and Access Management and Application Security domains of the SCS-C03 AWS Certified Security - Specialty exam.
Option Analysis:
Configure Amazon Cognito user pools for user authentication: Correct, first step. This managed service removes the burden of maintaining a custom user directory for external users, aligning with the minimal overhead requirement.
Set up an IAM role for each microservice. Grant each role appropriate permissions: Correct, final step. These roles enforce least-privilege access for ECS workloads, restricting microservice permissions to only what is required for operation, and supporting secure access from validated API Gateway requests.
Implement an Amazon API Gateway HTTP API with AWS Lambda authorizers to validate tokens before forwarding requests to microservices: Correct, third step. Lambda authorizers validate user tokens and issue temporary, scoped access policies, ensuring users only receive short-lived credentials to access backend resources.
Create an Amazon DynamoDB table to store user credentials for each microservice: Incorrect. This requires manual management of user credentials and a custom user database, which directly violates the requirement to minimize user database management overhead. Cognito provides this functionality as a fully managed service.
Create an Amazon Cognito application client to interact with the web application: Correct, second step. The app client enables the web application to integrate with the Cognito user pool, initiate authentication flows, and receive ID, access, and refresh tokens for authenticated users.
Set up AWS IAM Identity Center to give users access to the microservices: Incorrect. IAM Identity Center is purpose-built for managing internal workforce access to AWS accounts and business applications, not for authenticating external customer users for public-facing web applications.
Key Concepts:
1. Amazon Cognito External Identity Management: Cognito user pools are a fully managed service for external customer identity and access management, supporting standard OIDC/OAuth 2.0 flows and eliminating the need to build and maintain custom user databases, a core IAM security best practice tested in SCS-C03.
2. API Gateway Lambda Authorizers: Lambda (custom) authorizers validate bearer tokens for API requests and generate temporary, least-privilege IAM policies to control access to backend resources, ensuring users only receive short-lived, scoped access credentials, which aligns with temporary security credential best practices.
3. Least Privilege IAM Roles for Container Workloads: IAM roles for ECS tasks provide temporary credentials to microservices, with granular permissions tailored to each workload's requirements, reducing attack surface and meeting IAM security best practices for containerized applications.
References:
Amazon Cognito User Pools Developer Guide,
https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools.html
Use API Gateway Lambda Authorizers,
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-use-lambda-authorizer.html