Creating an AWS IAM Role for the Vault EC2 Instances for the AWS KMS Rekey Permissions

Creating an AWS IAM Role for the Vault EC2 Instances for the AWS KMS Rekey Permissions

97
Created On 11/10/26 10:59 AM - Last Modified 11/10/26 15:57 PM


Objective


The steps below will create an AWS IAM Role containing an AWS Policy which will grant the IAM Role the permissions needed by the Vault EC2 instances for the AWS KMS ReKey Process. We will then attach that IAM Role to the Vault EC2 instances so they may have the permissions they need to perform the AWS Rekey process.

Environment


10.0;10.1;10.2;10.3;10.4;10.5;10.6;10.7;10.8;10.9;10.10;11.1;11;11.2;11.3;11.4

Procedure


 

Step 1: Log into AWS and click on “Services” on the top-left hand corner

Step 2: Select the “IAM” service in the drop-down menu

Step 3: Select “Policies” on the left-hand side of the screen and then select the “Create policy” button

Step 4: Select “Choose a service”

Step 5: Type “KMS” and then select the blue “KMS” option that appears

Step 6: Expand “Access Level > Write” section and select the four permissions needed by the Vault Instances for the AWS KMS integration:

  • kms:CreateKey
  • kms:GenerateRandom
  • kms:Encrypt
  • kms:Decrypt

 

Step 7: Click on “Specify key resource ARN for the Decrypt and 1 more action” orange text


Step 8: Select “All Resources” and then click on the “Review policy” button
 

Step 9: Enter the “Name” of the policy, then fill out the “Description” field appropriately” and finally click on the “Create policy” button


Step 10: Click on “Roles” on the left-hand side and then click on the “Create role” button

Step 11: Select “EC2” from the “Common use case” section and then click the “Next: Permissions” button

Step 12: Type the name of the policy we created previously, check the box next to the name of the policy, and then click the “Next: Tags” button

Step 13: Skip the “Add tags (optional)” page by clicking the “Next: Review” button

Step 14: Enter the “Role Name” of the IAM role, then fill out the “Description” field appropriately” and finally click on the “Create role” button

Step 15: Click on Services on the top-left corner of AWS and select “EC2” in the drop-down menu

Step 16: Click on “Running Instances” in the “Resources” section of the page

Step 17: Right-click on your Vault EC2 Instance and navigate to “Instance Settings > Attach/Replace IAM Role”

Step 18: In the “IAM role” search box type the name of the IAM Role we created previously that has the attached policy containing the necessary AWS KMS permissions needed by the Vault EC2 Instances and then click the orange text for our IAM Role

Step 19: Once your IAM Role properly is selected, click the “Apply” button

Step 20: On the confirmation page, click the “Close” button

Step 21: In the “Description” tab of the EC2 instance that we attached the IAM Role to we will see that for the “IAM role” parameter populated with our selected IAM Role

Step 22: Please perform Steps 17-21 for the DR Vault as well

 



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj000000144uCAA&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail