A developer needs to encrypt a database password of size directly using an AWS Key Management Service (AWS KMS) key. Which AWS KMS API operation should the developer call to encrypt this payload?
- AGenerateDataKey
- BPutParameter
- EncryptAnswer
- DGenerateDataKeyWithoutPlaintext
Answer
Encrypt
The Encrypt API operation is designed to encrypt small payloads (up to ) directly using a specified customer managed key or AWS managed key. Since the database password size is , it fits within this limit and can be encrypted directly in a single API call.
Step-by-Step Solution
Key Concept
Direct encryption of small payloads using the AWS KMS Encrypt API
Estimated Time:45s