An organization operates a multi-account AWS environment managed under AWS Organizations. An application running on Amazon EC2 instances in a production member account must securely access and decrypt highly confidential financial data stored in an Amazon S3 bucket within a shared services account. The S3 bucket is encrypted with an AWS KMS customer managed key located in the shared services account. The solution must also retrieve database credentials that require rotation every days.
Which design should a solutions architect implement to meet these security requirements?
- Attach an IAM instance profile to the EC2 instances that references an IAM role. Configure the KMS key policy and the S3 bucket policy in the shared services account to grant permissions to the EC2 role. Store the database credentials in AWS Secrets Manager and enable automatic rotation every days using an AWS Lambda function.Cevap
- BUse the production account's root user access keys configured in a local credential file on the EC2 instances to access the shared S3 bucket. Store the database credentials in AWS Systems Manager Parameter Store as a Standard parameter, and write a custom script on the EC2 instances to rotate the password every days using the root credentials.
- CCreate a cross-account IAM role for the EC2 instances. Store the database credentials as a plaintext String parameter in AWS Systems Manager Parameter Store to allow EC2 instances to retrieve them, and configure an Amazon EventBridge rule to trigger a Lambda function to update the parameter value every days.
- DAttach an IAM role to the EC2 instances with cross-account S3 access. Enable automatic key rotation for the KMS customer managed key in the shared services account, which will immediately re-encrypt all historical S3 data under the new key version, and store the database credentials in Systems Manager Parameter Store as a SecureString.
Cevap
Attach an IAM instance profile to the EC2 instances that references an IAM role, configure cross-account permissions in the shared services account's S3 bucket policy and KMS key policy to trust the role, and store and automatically rotate the credentials in AWS Secrets Manager using a Lambda function.
The correct solution uses an IAM instance profile to assign temporary credentials to the EC2 instances. For cross-account access to S3 and KMS in the shared services account, both the S3 bucket policy and the KMS key policy must trust the EC2 role from the production account. Storing and rotating database credentials every days is a native capability of AWS Secrets Manager using AWS Lambda, representing the most secure and low-overhead solution.
Adım Adım Çözüm
Anahtar Kavram
Cross-account resource access using IAM roles combined with secure secrets management and rotation.
Tahmini Süre:2m 30s