SCS-C02 · Question #44
A company has a single-page application (SPA) that is served by Amazon CloudFront. An Amazon S3 bucket is the origin of the CloudFront distribution. The company is using Amazon Cognito for authenticat
The correct answer is C. Implement an Amazon Cognito hosted UI for the login. Add Lambda@Edge logic to the. Cognito login UI is separate UI component, which is not part of index.html. https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app- integration.html#cognito-user-pools-create-an-app-integration
Question
A company has a single-page application (SPA) that is served by Amazon CloudFront. An Amazon S3 bucket is the origin of the CloudFront distribution. The company is using Amazon Cognito for authentication. An external security review reveals that unauthenticated users can download the application source code from the SPA in index.html and view internal details of the SPA. A security engineer needs to implement a solution to avoid exposing the source code to unauthenticated users. Which solution will meet these requirements?
Options
- ASplit the login logic to a separate login.html page. Designate the new page as the landing page.
- BChange the authentication method in Amazon Cognito to use an AWS Lambda authorizer.
- CImplement an Amazon Cognito hosted UI for the login. Add Lambda@Edge logic to the
- DCreate an origin access identity (OAI). Associate the OAI with the CloudFront distribution.
How the community answered
(31 responses)- A6% (2)
- B10% (3)
- C81% (25)
- D3% (1)
Explanation
Cognito login UI is separate UI component, which is not part of index.html. https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pools-app- integration.html#cognito-user-pools-create-an-app-integration
Topics
Community Discussion
No community discussion yet for this question.