February 2020
Intermediate to advanced
440 pages
13h 51m
English
We can grant encrypt permission to testuser and then use it to encrypt as follows:
aws kms create-grant \ --key-id 1ab77c7a-7ca4-4387-a4c5-2fba3cb5c0f5 \ --grantee-principal arn:aws:iam::135301570106:user/testuser \ --operations "Encrypt" \ --profile awssecadmin
We should get a response similar to the one shown in the following screenshot:

We can get the user's ARN from the IAM dashboard or prepare one based on the preceding format. We can also use the following command to get the user's ARN from the console:
aws iam get-user ...
Read now
Unlock full access