AWS Certified Solutions Architect – Professional — Question 214

A company uses Amazon S3 to host a web application. Currently, the company uses a continuous integration tool running on an Amazon EC2 instance that builds and deploys the application by uploading it to an S3 bucket. A Solutions Architect needs to enhance the security of the company's platform with the following requirements:
✑ A build process should be run in a separate account from the account hosting the web application.
✑ A build process should have minimal access in the account it operates in.
✑ Long-lived credentials should not be used.
As a start, the Development team created two AWS accounts: one for the application named web account process; other is a named build account.
Which solution should the Solutions Architect use to meet the security requirements?

Answer options

Correct answer: B

Explanation

The correct answer is B, as it allows the build account to assume an IAM role that has specific permissions for s3:PutObject in the web account without using long-lived credentials. Option A incorrectly allows the build account itself rather than the IAM role to access the S3 bucket. Option C introduces an IAM user with long-lived credentials, which contradicts the requirements for security. Option D also relies on IAM user credentials, which do not meet the criteria for minimal access and avoiding long-lived credentials.