A developer is designing a containerized microservice on Amazon ECS that processes and stores sensitive customer profiles. During a compliance audit, the security team mandates that any profile larger than must be encrypted before being written to an external database. The microservice must also retrieve and decrypt these profiles. Additionally, the database credentials used by the microservice must be rotated automatically every 30 days.
Which combination of AWS services and programmatic workflows should the developer implement to meet these requirements?
- Store the database credentials in AWS Secrets Manager and configure automatic rotation. For customer profiles, implement client-side envelope encryption by calling the KMS GenerateDataKey API to obtain a plaintext data key and a ciphertext data key, encrypting the profile locally with the plaintext data key, and storing the ciphertext data key along with the encrypted profile.Answer
- BStore the database credentials and customer profiles in AWS Systems Manager Parameter Store, and enable automatic parameter rotation. For customer profiles larger than , call the KMS Encrypt API directly to encrypt the profiles in a single API call before saving them.
- CStore the database credentials in AWS Secrets Manager and enable automatic rotation. For customer profiles, call the KMS GenerateDataKeyWithoutPlaintext API to obtain an encrypted data key, use it to encrypt the profiles locally using a symmetric encryption library, and store the encrypted profile.
- DStore the database credentials in AWS KMS and enable automatic rotation of the Customer Managed Key. For customer profiles, call the KMS Encrypt API directly for profiles smaller than , and for profiles larger than , split the payload into chunks and call the Encrypt API for each chunk.
Answer
Store the database credentials in AWS Secrets Manager with automatic rotation, and use client-side envelope encryption with the KMS GenerateDataKey API to encrypt and decrypt the large customer profiles.
The correct option correctly identifies AWS Secrets Manager for storing and automatically rotating database credentials. It also correctly specifies the client-side envelope encryption workflow using the KMS GenerateDataKey API to obtain both plaintext and ciphertext data keys, allowing the application to encrypt the large profile payload locally.
Step-by-Step Solution
Key Concept
AWS KMS envelope encryption and secrets rotation constraints