kms:CreateGrant

Permissions management

kms:CreateGrant is a Permissions management access-level action in the kms service. Controls permission to add a grant to an AWS KMS key. You can use grants to add permissions without changing the key policy or IAM policy

Resource types

ARNs that kms:CreateGrant can be scoped to in an IAM policy.

arn:${Partition}:kms:${Region}:${Account}:key/${KeyId} required
key

Condition keys

Keys you can use in the Condition block of a policy that grants kms:CreateGrant.

kms:CallerAccount String

Filters access to specified AWS KMS operations based on the AWS account ID of the caller. You can use this condition key to allow or deny access to all IAM users and roles in an AWS account in a single policy statement

kms:EncryptionContext:${EncryptionContextKey} String

Filters access to a symmetric AWS KMS key based on the encryption context in a cryptographic operation. This condition evaluates the key and value in each key-value encryption context pair

kms:EncryptionContextKeys ArrayOfString

Filters access to a symmetric AWS KMS key based on the encryption context in a cryptographic operation. This condition key evaluates only the key in each key-value encryption context pair

kms:GrantConstraintSourceArn ARN

Filters access to the CreateGrant operation based on the value of SourceArn constraint in the request

kms:GrantConstraintType String

Filters access to the CreateGrant operation based on the grant constraint in the request

kms:GrantIsForAWSResource Bool

Filters access to the CreateGrant operation when the request comes from a specified AWS service

kms:GrantOperations ArrayOfString

Filters access to the CreateGrant operation based on the operations in the grant

kms:GranteePrincipal String

Filters access to the CreateGrant operation based on the grantee principal in the grant

kms:GranteeServicePrincipal String

Filters access to the CreateGrant operation based on the value of GranteeServicePrincipal in the request

kms:RetiringPrincipal String

Filters access to the CreateGrant operation based on the retiring principal in the grant

kms:RetiringServicePrincipal String

Filters access to the CreateGrant operation based on the value of RetiringServicePrincipal in the request

kms:ViaService String

Filters access when a request made on the principal's behalf comes from a specified AWS service

aws:ResourceTag/${TagKey} String

Filters access to the specified AWS KMS operations based on tags assigned to the AWS KMS key

kms:KeyOrigin String

Filters access to an API operation based on the Origin property of the AWS KMS key created by or used in the operation. Use it to qualify authorization of the CreateKey operation or any operation that is authorized for a KMS key

kms:KeySpec String

Filters access to an API operation based on the KeySpec property of the AWS KMS key that is created by or used in the operation. Use it to qualify authorization of the CreateKey operation or any operation that is authorized for a KMS key resource

kms:KeyUsage String

Filters access to an API operation based on the KeyUsage property of the AWS KMS key created by or used in the operation. Use it to qualify authorization of the CreateKey operation or any operation that is authorized for a KMS key resource

kms:MultiRegion Bool

Filters access to an API operation based on the MultiRegion property of the AWS KMS key created by or used in the operation. Use it to qualify authorization of the CreateKey operation or any operation that is authorized for a KMS key resource

kms:MultiRegionKeyType String

Filters access to an API operation based on the MultiRegionKeyType property of the AWS KMS key created by or used in the operation. Use it to qualify authorization of the CreateKey operation or any operation that is authorized for a KMS key resource

kms:ResourceAliases ArrayOfString

Filters access to specified AWS KMS operations based on aliases associated with the AWS KMS key

Example IAM policy

A minimal policy that allows kms:CreateGrant. Replace "Resource": "*" with a specific ARN to follow least privilege.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowKmsCreateGrant",
      "Effect": "Allow",
      "Action": "kms:CreateGrant",
      "Resource": "*"
    }
  ]
}

Related actions in kms

View all kms actions →