In this recipe, we will learn how to use a CMK from one account in another account.
Sharing customer-managed keys across accounts
Getting ready
We need two AWS accounts to complete this recipe. I am reusing the accounts we created using AWS organizations in Chapter 1, Managing AWS Accounts with IAM and Organizations, with the account ID of the first account set to 135301570106 and the account ID of the second account set to 380701114427.
How to do it...
First, we will create a new CMK in the first account. After that, we will provide permissions to use it from the second...