A digital media startup is developing a mobile photo-sharing application that requires millions of end-users to upload images directly to a private Amazon S3 bucket. Which of the following approaches aligns with AWS Identity and Access Management (IAM) best practices for granting access to these users?
- Configure web identity federation using Amazon Cognito to provide users with temporary AWS security credentials.Answer
- BGenerate a single set of long-term API access keys for an IAM user and embed them in the mobile application code.
- CEnable programmatic access keys on the AWS account root user and configure the application backend to share them with client devices.
- DDisable block public access on the S3 bucket and use a bucket policy to allow unrestricted uploads from any source.
Answer
Configure web identity federation using Amazon Cognito to provide users with temporary AWS security credentials.
The correct option is to configure web identity federation using Amazon Cognito. According to AWS IAM best practices, mobile application users should authenticate against an identity provider (such as Amazon Cognito, Google, or Apple) and exchange their identity token for temporary AWS security credentials. These temporary credentials have limited permissions and automatically expire, removing the need to distribute long-term AWS credentials.
Step-by-Step Solution
Key Concept
Identity Federation and Temporary Security Credentials
Estimated Time:2m 0s