AWS KMS Permission Issue: User Not Authorized to Perform kms:CreateGrant

Abstract: Resolve the User is not authorized to perform kms:CreateGrant error by updating IAM or KMS key policies to explicitly allow the CreateGrant action.

Created: 2026-08-19 by
The error "User is not authorized to perform kms:CreateGrant" occurs when an IAM identity lacks the necessary permissions in its policy or the KMS key policy to create a grant for a specific Customer Master Key (CMK). This operation is critical for services like Amazon EBS, Amazon EFS, and AWS Lambda that need to encrypt data using your managed keys. To resolve this, you must update either the IAM user’s inline policy or the KMS key’s resource-based policy to explicitly allow the kms:CreateGrant action for the specific principal attempting the operation.

Understanding the CreateGrant Operation

In AWS Key Management Service (KMS), encryption operations often require a cryptographic grant. A grant allows a service or user to use a CMK without exposing the key material itself. When you see the kms:CreateGrant error, it means the requesting entity has permission to use the key (e.g., kms:Encrypt) but does not have permission to establish the grant mechanism required by modern AWS services. This is distinct from simply having access to the key; it is a separate authorization step.

If you are managing infrastructure via code, such as Terraform or CloudFormation, this error frequently appears during the initial provisioning phase. For example, when creating an encrypted EBS volume, the EC2 service needs to create a grant on the KMS key. If the EC2 service role or the user triggering the creation doesn't have kms:CreateGrant, the process fails immediately. It is important to note that grants can be created with constraints, limiting how the grantee can use the key, which adds a layer of security beyond simple key access.

Auditing Current Permissions

Before modifying policies, you should verify exactly which identity is failing and what permissions they currently hold. Use the AWS IAM Policy Simulator to test the scenario. Enter the ARN of the user or role, select the kms:CreateGrant action, and specify the resource ARN of the KMS key. The simulator will tell you if the request is allowed, denied, or if there is an explicit deny from a service control policy (SCP).

Additionally, check the KMS key policy. By default, the account root user has full access, but other principals might be restricted. If you are using a shared environment, ensure that the KMS key policy explicitly lists the accounts or users that need to create grants. You can view the key policy in the AWS Management Console under the "Key users" tab or by using the aws kms describe-key command. Look for statements that include kms:CreateGrant in the Action array.

Updating IAM User Policies

If the issue lies with a specific IAM user or role, you need to attach a policy that grants the necessary permissions. You can do this by attaching an inline policy or a managed policy to the identity. Below is an example of an IAM policy document that allows kms:CreateGrant for a specific key.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "kms:CreateGrant",
        "kms:DescribeKey"
      ],
      "Resource": "arn:aws:kms:region:account-id:key/key-id"
    }
  ]
}

Replace region, account-id, and key-id with your actual values. Note that including kms:DescribeKey is often helpful because many applications call this API first to verify the key exists before attempting to create a grant. Without it, you might encounter a secondary error regarding key description visibility. Always apply the principle of least privilege; restrict the Resource field to only the keys that the user absolutely needs to manage.

Updating the KMS Key Policy

Sometimes, the IAM policy is correct, but the KMS key policy blocks the action. This happens if the key policy is restrictive and does not list the requesting principal. To fix this, go to the KMS console, select the key, and choose "Edit key policy." Add a statement similar to the one below:

{
  "Sid": "AllowCreateGrantForService",
  "Effect": "Allow",
  "Principal": {
    "AWS": "arn:aws:iam::account-id:role/role-name"
  },
  "Action": [
    "kms:CreateGrant",
    "kms:Decrypt",
    "kms:Encrypt"
  ],
  "Resource": "*"
}

This approach is particularly useful when granting permissions to AWS services themselves, such as allowing an S3 bucket to encrypt objects with a specific KMS key. The service role acting on behalf of the service must be listed in the key policy. If you are unsure about the exact role ARN, check the service documentation for the specific AWS service you are integrating with.

Common Troubleshooting Steps

  • Check for Explicit Denies: Review your Organization SCPs and IAM Permission Boundaries. An explicit deny at any level overrides allow statements in user policies.
  • Verify Key State: Ensure the KMS key is enabled. Disabled keys cannot be used for any operations, including grant creation. Check the key state in the KMS console.
  • Review Recent Changes: Did you recently rotate the key alias or change the key policy? Sometimes, caching issues in the AWS SDK can cause temporary failures. Wait a few minutes and retry.
  • Check Multi-Region Keys: If you are using a multi-region primary key, ensure you are calling CreateGrant on the correct region. Grants are regional resources.

Resolving permission issues in AWS requires careful attention to both identity-based and resource-based policies. By ensuring that both the IAM principal and the KMS key policy explicitly allow kms:CreateGrant, you can prevent these errors and maintain secure, encrypted workflows across your infrastructure.

Frequently Asked Questions

Why do I get an error even though I have kms:Encrypt permission?

Having kms:Encrypt allows you to use the key, but it does not authorize you to create the cryptographic grant required by many AWS services. Modern AWS services automatically attempt to create a grant when they use a customer-managed key. You must explicitly add kms:CreateGrant to your policy to satisfy this requirement.

Can I use a wildcard (*) in the Resource field for kms:CreateGrant?

While technically possible, using a wildcard is discouraged due to security risks. It allows the identity to create grants on any KMS key in the account. Instead, specify the exact ARN of the key you need to manage. This follows the principle of least privilege and prevents accidental or malicious misuse of other keys.

Does kms:CreateGrant require kms:Decrypt permission?

No, kms:CreateGrant does not strictly require kms:Decrypt. However, most practical scenarios involve using the key for encryption and decryption. If your application needs to decrypt data, you must add kms:Decrypt separately. The grant itself controls who can use the key, but the IAM policy controls whether the caller can initiate the grant creation.

How long does it take for policy changes to take effect?

IAM policy changes typically propagate within seconds to a few minutes. However, AWS recommends waiting up to 5 minutes after making changes before testing again. If you are using the AWS CLI or SDK, ensure you are not using cached credentials that might reflect an older state. Clearing your credential cache or refreshing the session can help.

What is the difference between a grant and a key policy?

A key policy defines who can access the key at the resource level. A grant is a temporary, fine-grained permission that allows a specific principal to use the key under certain conditions. Grants are often created programmatically by AWS services. You can limit a grant to specific IP addresses or VPC endpoints, offering more dynamic control than a static key policy.

Latest News

How to Display Output of xterm Command in Terminal Screen using Cron

Resolve the inability to display xterm output in a terminal screen from cron by redirecting logs or using wall instead of insecure X11 workarounds.

Read More
Expose Local Server on VPS Preserving Real Client IPs (OS Level)

Resolve VPS logging showing only gateway IPs by configuring reverse proxies to forward real client addresses via X-Forwarded-For headers.

Read More
How to Clear Recent Files History in Linux without Deleting Actual Files?

Clear recent files history in Linux by deleting ~/.local/share/recently-used.xbel without removing the actual files.

Read More
Best HDD Copy Strategy: Manually Syncing and Rewriting Scratch

Resolve data drift between two 4TB hard drives by using rsync with the --delete flag to manually sync and rewrite scratch data for an exact mirror.

Read More
Understanding Bash Prompt Abbreviations: An Overview

Resolve repetitive typing errors by creating and persisting Bash aliases in the .bashrc file for improved command-line efficiency.

Read More
Free Tools and Methods to Log Real-Time Performance Details in Task Manager

Log real-time CPU and memory metrics to CSV files using Windows Performance Monitor Data Collector Sets to troubleshoot system slowness.

Read More
Contact Qatar Airways Customer Service: Phone Number, Help Center, and More

Resolve urgent Qatar Airways reservation issues like flight changes and baggage claims using the US phone number +1801-855-5905 or online self-service tools.

Read More
Windows 11: Alt Codes Displaying Wrong Characters - Solutions

Resolve Windows 11 Alt codes showing wrong characters by verifying the US keyboard layout and enabling Num Lock.

Read More
Run Programs with Elevated Privileges: A Comprehensive Guide

Eliminates the need to type sudo for frequent administrative tasks by configuring .bashrc aliases or functions.

Read More
Dynamically Changing Dates in Excel Formulas Using Cells

Eliminate manual date updates in Excel by using cell references to create dynamic formulas that automatically adjust calculations when input dates change.

Read More
Granting Edit Access to a Specific Excel Sheet in an Office 365 User Email ID-Based Login

Excel Online lacks native sheet-level permissions, so users must split workbooks or use worksheet protection to isolate edit access for specific tabs.

Read More
Creating Network Load on Local Wi-Fi from One PC

Generate sustained Wi-Fi bandwidth load from a single PC using a VM SFTP server to test router stability and throughput.

Read More
Changing the Default Editor for Batch Files in Windows 11's File Explorer

Resolve the issue of batch files opening in Notepad by changing the default editor to a preferred application like VS Code.

Read More
Gain WiFi Connection Minutes Before Losing it by Changing MAC Address

Bypass MAC address filtering to restore WiFi connectivity temporarily when a device is blocked by network administrators.

Read More
Photos Folders Turned Black: Troubleshooting Picture Applications on Windows

Resolve black screens in Windows Photos by resetting the app, updating graphics drivers, and repairing system files.

Read More
Troubleshooting High CPU Temperature Values: A Step-by-Step Guide

Resolve high CPU temperatures and thermal throttling by monitoring with Speedfan, cleaning dust from cooling components, and replacing degraded thermal paste.

Read More
Make cURL establish TLS connection with CA unknown

Resolve cURL TLS connection failures with unknown or self-signed certificates by using the --insecure flag to bypass CA validation.

Read More
Troubleshooting Incorrect Network Metrics Values in Grafana, Prometheus, InfluxDB, and Telegraf

Fix incorrect network metrics in Grafana, Prometheus, InfluxDB, and Telegraf by verifying interface selection, resolving unit mismatches, and handling counter resets.

Read More
Start Another Terminal Window (cmd.exe) Windows Repair/Troubleshoot

Provides step-by-step instructions to access the Windows Command Prompt via bootable media for advanced system repair and troubleshooting.

Read More
Thinkpad P1 Gen 6: Sudden Thunderbolt 3 Dock USB-C Charging Stopped Working

Resolve sudden Thunderbolt 3 dock USB-C charging and internet failure on ThinkPad P1 Gen 6 by updating firmware, resetting the dock, and adjusting power settings.

Read More
ASUS Windows 11 Laptop: Internet Connection Issue with Hotspot

Resolve ASUS Windows 11 laptop spinning wheel issue when connecting to mobile hotspot by resetting network stack, disabling IPv6, and adjusting power settings.

Read More
Developing iOS Project with Firebase: Logging in and Sending Push Notifications

Integrates Firebase to enable secure user authentication and push notifications in iOS applications.

Read More
Troubleshooting Bash Script with Suspected Issues of Spaces, Dashes, Filenames and Quoting

Resolve Bash script failures caused by word splitting, globbing, and special characters in filenames by applying proper quoting techniques.

Read More
Populating OneDrive Folder for Local Backup without Affecting Remote Files

Prevent OneDrive from deleting remote files during Windows reinstallation by unlinking the account or using symbolic links to isolate local data.

Read More
Force First Frame as Keyframe Without Re-encoding: A Quick Solution

Resolve inaccurate seeking and playback glitches by re-encoding video to ensure the first frame is a valid keyframe.

Read More
Find Information in Database Using WSL (Ubuntu) on Windows-10

Resolve database connection issues from WSL Ubuntu on Windows 10 by configuring client tools and network access to query remote or local servers.

Read More
Configuring a New Router with Different Networks: One Family, One Guest

Resolve IP conflicts and isolate guest traffic by configuring a second router with a distinct subnet via its WAN port.

Read More
Quickly Open Multiple Stock Websites with a Single Command

Solve the problem of manually opening multiple stock research websites by creating a single command to launch them simultaneously on Windows, macOS, or Linux.

Read More
Improved Adobe Acrobat Search Experience: Access Advanced Search with Ease

Access advanced search filters like case sensitivity and regex in Adobe Acrobat by clicking More Options in the Find bar.

Read More
Port Forwarding VM via OpenVPN: A Comprehensive Guide

Configure OpenVPN server and iptables to forward specific ports from VPN clients to a virtual machine's internal IP address.

Read More
Understanding Partitions in the 1980s: A Look Back at MS-DOS and Master Boot Record

Explains how the Master Boot Record and partition table enabled MS-DOS to manage multiple disk volumes on a single physical drive.

Read More
Windows 10 Enterprise: Keyboard Not Detected in Managed Organization with Admin Privileges

Resolve Windows 10 Enterprise keyboard detection failures caused by Group Policy restrictions, driver corruption, or USB enumeration errors.

Read More
Can't Find x86_64 Versions of Applications on MacOS arm64 (M1)

Resolve missing x86_64 app issues on M1 Macs by installing Rosetta 2 and reinstalling apps as universal binaries.

Read More
How to Hide Installation Source for an Android App

Manage Android app installation source visibility by using USB transfers or file managers to reduce browser traces and isolate data via work profiles.

Read More
Connecting Momentus 4200.2 ST9808210A Hard Drive via USB Cable

Resolve inability to access Seagate Momentus 4200.2 ST9808210A hard drive by connecting it via USB using a compatible SATA-to-USB adapter and configuring the disk in Windows.

Read More