A company is deploying a new application on Amazon EC2 instances in a private subnet. The application requires secure read-only access to an Amazon S3 bucket and must retrieve database passwords that are rotated monthly. The development team, who are federated from the company's on-premises Active Directory, also needs administrative access to manage the EC2 instances. The security architect must design a solution that enforces the principle of least privilege, avoids long-term credentials, and prevents credentials from being stored in plaintext. Which combination of actions will meet these requirements? (Select TWO.)
- Associate an IAM role with the EC2 instances via an instance profile to grant read-only access to the S3 bucket, and store the database passwords in AWS Secrets Manager with automatic rotation enabled.Answer
- Configure AWS IAM Identity Center and establish SAML 2.0 federation with the on-premises Active Directory to grant the development team temporary administrative access to the EC2 instances.Answer
- CGenerate access keys for the AWS account root user and configure them on the EC2 instances to grant S3 access, and use the root account to manage EC2 administrative tasks.
- DCreate individual IAM users with long-term credentials for each developer in the on-premises Active Directory to allow them to log in and perform administrative tasks on the EC2 instances.
- EStore the database passwords as plaintext String parameters in Systems Manager Parameter Store and write a custom script on the EC2 instances to retrieve them.
Answer
The application should use an IAM role associated via an instance profile to access the S3 bucket, and database passwords should be stored in AWS Secrets Manager with automatic rotation. The development team should access the AWS environment through federation configured with AWS IAM Identity Center.
The correct strategy combines IAM roles on EC2 instances for secure, service-to-service access with AWS Secrets Manager for encrypted, rotated secrets. For human access, federating the existing Active Directory with AWS IAM Identity Center provides short-lived temporary access, eliminating long-term credentials and centralized credential management.
Step-by-Step Solution
Key Concept
Applying least privilege, temporary security credentials via IAM roles/federation, and secure secrets management with automated rotation.