A developer needs to secure a database connection string containing credentials. The string is in size, and the developer wants to perform direct server-side encryption using an AWS KMS customer managed key without generating and managing local data keys. Which AWS KMS API operation should the developer call to encrypt this payload directly?
- AGenerateDataKey
- BGenerateDataKeyWithoutPlaintext
- EncryptAnswer
- DPutParameter
Answer
The correct answer is the Encrypt API operation, which allows direct encryption of small payloads up to .
The Encrypt API operation in AWS KMS is designed to directly encrypt small payloads up to using a specified KMS key. Since the database connection string is only in size, the developer can send the plaintext directly to AWS KMS for encryption without the overhead of generating, managing, and storing local data keys.
Step-by-Step Solution
Key Concept
AWS KMS Direct Encryption Limits
Estimated Time:45s