A developer is writing a script to encrypt a small configuration string of size before storing it in a database. The developer wants to use AWS KMS to perform the encryption directly on the AWS side, avoiding the complexity of local envelope encryption. Which AWS KMS API operation should the developer call to encrypt this data?
- EncryptCevap
- BGenerateDataKey
- CReEncrypt
- DGetSecretValue
Cevap
The Encrypt operation should be called because it directly encrypts small payloads (up to ) using the KMS key on the AWS side.
The correct answer is the direct encryption operation because the payload is small (), which is below the limit for direct KMS encryption, allowing the developer to encrypt it without the overhead of client-side envelope encryption.
Adım Adım Çözüm
Anahtar Kavram
Direct encryption using AWS KMS is limited to payloads of up to , whereas larger payloads require client-side envelope encryption using generated data keys.