A developer needs temporary access to resources in a different AWS account. Which approach provides the most secure temporary access?
Choose an answer
Tap an option to check your answer.
Correct answer: Create a cross-account IAM role in the target account and call sts:AssumeRole to receive short-lived credentials..
Why this is the answer
Creating a cross-account IAM role in the target account and using sts:AssumeRole is the most secure and recommended method for temporary cross-account access. This approach grants temporary security credentials with a defined expiration, eliminating the need to share long-term credentials. The calling account assumes the role, inheriting its permissions for a limited duration. Using Amazon Cognito user pools is for user authentication and authorization within an application, not for granting programmatic cross-account AWS resource access. Creating and mailing IAM access keys is highly insecure as it involves sharing long-term credentials over an unencrypted channel, posing a significant security risk. Establishing trust and adding an SSH key to an IAM user is for secure shell access to EC2 instances, not for programmatic cross-account AWS API access.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed