A developer is building a multi-region active-active web application deployed across `us-east-1` and `us-west-2` using AWS Lambda. The application must securely retrieve a database credential that requires automatic rotation every days, as well as a region-specific database connection endpoint URL that is non-sensitive. The solution must minimize cross-region latency for credential retrieval and optimize cost. Which combination of services and configuration should the developer use to meet these requirements?
- AStore the database credential as a SecureString parameter in AWS Systems Manager Parameter Store in `us-east-1` with cross-region replication enabled. Store the connection endpoint URL in AWS Secrets Manager as a secret replicated to `us-west-2`.
- Store the database credential in AWS Secrets Manager in `us-east-1` with automatic rotation configured, and replicate the secret to `us-west-2`. Store the non-sensitive connection endpoint URL in AWS Systems Manager Parameter Store as a regional String parameter in each region.Cevap
- CStore both the database credential and the connection endpoint URL in a single secret in AWS Secrets Manager in `us-east-1`, replicate it to `us-west-2`, and hardcode AWS IAM access keys in the Lambda function code to decrypt and retrieve the secret across regions.
- DStore the database credential in AWS Secrets Manager in `us-east-1` and write a custom Lambda function to copy the secret value to `us-west-2` after each rotation. Store the connection endpoint URL as a SecureString parameter in AWS Systems Manager Parameter Store in `us-east-1` and access it across regions.
Cevap
Store the database credential in AWS Secrets Manager in `us-east-1` with automatic rotation configured, and replicate the secret to `us-west-2`. Store the non-sensitive connection endpoint URL in AWS Systems Manager Parameter Store as a regional String parameter in each region.
Storing the database credential in AWS Secrets Manager meets the requirement for automatic rotation, and replication to the secondary region ensures low-latency local access. Utilizing Systems Manager Parameter Store for the connection endpoint is cost-effective, and storing it as a regional parameter in each region eliminates cross-region latency.
Adım Adım Çözüm
Anahtar Kavram
Selecting the correct secret and parameter management service based on sensitivity, replication, rotation, and cost constraints.
Tahmini Süre:2m 0s