kms:GenerateRandom

Write

kms:GenerateRandom is a Write access-level action in the kms service. Controls permission to get a cryptographically secure random byte string from AWS KMS

Resource types

This action does not support resource-level permissions; use "Resource": "*" in your policy.

Condition keys

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

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:RecipientAttestation:ImageSha384 String

Filters access to the API operations based on the image hash in the attestation document in the request

kms:RecipientAttestation:NitroTPMPCR0 String

Filters access by the platform configuration register (PCR) 0 in the attestation document in the request. PCR0 is a contiguous measure of core system firmware executable code

kms:RecipientAttestation:NitroTPMPCR1 String

Filters access by the platform configuration register (PCR) 1 in the attestation document in the request. PCR1 is a contiguous measure of core system firmware data/host platform configuration, typically including serial and model numbers

kms:RecipientAttestation:NitroTPMPCR10 String

Filters access by the platform configuration register (PCR) 10 in the attestation document in the request. PCR10 is a contiguous measure of protection of the IMA measurement log

kms:RecipientAttestation:NitroTPMPCR11 String

Filters access by the platform configuration register (PCR) 11 in the attestation document in the request. PCR11 is a contiguous measure of all components of unified kernel images (UKIs)

kms:RecipientAttestation:NitroTPMPCR12 String

Filters access by the platform configuration register (PCR) 12 in the attestation document in the request. PCR12 is a contiguous measure of kernel command line, system credentials and system configuration images

kms:RecipientAttestation:NitroTPMPCR13 String

Filters access by the platform configuration register (PCR) 13 in the attestation document in the request. PCR13 is a contiguous measure of all system extension images for the initrd

kms:RecipientAttestation:NitroTPMPCR14 String

Filters access by the platform configuration register (PCR) 14 in the attestation document in the request. PCR14 is a contiguous measure of "MOK" certificates and hashes

kms:RecipientAttestation:NitroTPMPCR15 String

Filters access by the platform configuration register (PCR) 15 in the attestation document in the request. PCR15 is a contiguous measure of root file system volume encryption key

kms:RecipientAttestation:NitroTPMPCR16 String

Filters access by the platform configuration register (PCR) 16 in the attestation document in the request. PCR16 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:NitroTPMPCR17 String

Filters access by the platform configuration register (PCR) 17 in the attestation document in the request. PCR17 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:NitroTPMPCR18 String

Filters access by the platform configuration register (PCR) 18 in the attestation document in the request. PCR18 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:NitroTPMPCR19 String

Filters access by the platform configuration register (PCR) 19 in the attestation document in the request. PCR19 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:NitroTPMPCR2 String

Filters access by the platform configuration register (PCR) 2 in the attestation document in the request. PCR2 is a contiguous measure of extended or pluggable executable code, including option ROMs on pluggable hardware

kms:RecipientAttestation:NitroTPMPCR20 String

Filters access by the platform configuration register (PCR) 20 in the attestation document in the request. PCR20 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:NitroTPMPCR21 String

Filters access by the platform configuration register (PCR) 21 in the attestation document in the request. PCR21 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:NitroTPMPCR22 String

Filters access by the platform configuration register (PCR) 22 in the attestation document in the request. PCR22 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:NitroTPMPCR23 String

Filters access by the platform configuration register (PCR) 23 in the attestation document in the request. PCR23 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:NitroTPMPCR3 String

Filters access by the platform configuration register (PCR) 3 in the attestation document in the request. PCR3 is a contiguous measure of extended or pluggable firmware data, including information about pluggable hardware

kms:RecipientAttestation:NitroTPMPCR4 String

Filters access by the platform configuration register (PCR) 4 in the attestation document in the request. PCR4 is a contiguous measure of boot loader and additional drivers, including binaries and extensions loaded by the boot loader

kms:RecipientAttestation:NitroTPMPCR5 String

Filters access by the platform configuration register (PCR) 5 in the attestation document in the request. PCR5 is a contiguous measure of GPT/Partition table

kms:RecipientAttestation:NitroTPMPCR6 String

Filters access by the platform configuration register (PCR) 6 in the attestation document in the request. PCR6 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:NitroTPMPCR7 String

Filters access by the platform configuration register (PCR) 7 in the attestation document in the request. PCR7 is a contiguous measure of SecureBoot state

kms:RecipientAttestation:NitroTPMPCR8 String

Filters access by the platform configuration register (PCR) 8 in the attestation document in the request. PCR8 is a contiguous measure of commands and kernel command line

kms:RecipientAttestation:NitroTPMPCR9 String

Filters access by the platform configuration register (PCR) 9 in the attestation document in the request. PCR9 is a contiguous measure of all files read (including kernel image)

kms:RecipientAttestation:PCR0 String

Filters access by the platform configuration register (PCR) 0 in the attestation document in the request. PCR0 is a contiguous measure of the contents of the enclave image file, without the section data

kms:RecipientAttestation:PCR1 String

Filters access by the platform configuration register (PCR) 1 in the attestation document in the request. PCR1 is a contiguous measurement of the Linux kernel and bootstrap data

kms:RecipientAttestation:PCR10 String

Filters access by the platform configuration register (PCR) 10 in the attestation document in the request. PCR10 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR11 String

Filters access by the platform configuration register (PCR) 11 in the attestation document in the request. PCR11 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR12 String

Filters access by the platform configuration register (PCR) 12 in the attestation document in the request. PCR12 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR13 String

Filters access by the platform configuration register (PCR) 13 in the attestation document in the request. PCR13 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR14 String

Filters access by the platform configuration register (PCR) 14 in the attestation document in the request. PCR14 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR15 String

Filters access by the platform configuration register (PCR) 15 in the attestation document in the request. PCR15 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR16 String

Filters access by the platform configuration register (PCR) 16 in the attestation document in the request. PCR16 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR17 String

Filters access by the platform configuration register (PCR) 17 in the attestation document in the request. PCR17 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR18 String

Filters access by the platform configuration register (PCR) 18 in the attestation document in the request. PCR18 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR19 String

Filters access by the platform configuration register (PCR) 19 in the attestation document in the request. PCR19 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR2 String

Filters access by the platform configuration register (PCR) 2 in the attestation document in the request. PCR2 is a contiguous, in-order measurement of the user applications, without the boot ramfs

kms:RecipientAttestation:PCR20 String

Filters access by the platform configuration register (PCR) 20 in the attestation document in the request. PCR20 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR21 String

Filters access by the platform configuration register (PCR) 21 in the attestation document in the request. PCR21 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR22 String

Filters access by the platform configuration register (PCR) 22 in the attestation document in the request. PCR22 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR23 String

Filters access by the platform configuration register (PCR) 23 in the attestation document in the request. PCR23 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR24 String

Filters access by the platform configuration register (PCR) 24 in the attestation document in the request. PCR24 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR25 String

Filters access by the platform configuration register (PCR) 25 in the attestation document in the request. PCR25 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR26 String

Filters access by the platform configuration register (PCR) 26 in the attestation document in the request. PCR26 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR27 String

Filters access by the platform configuration register (PCR) 27 in the attestation document in the request. PCR27 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR28 String

Filters access by the platform configuration register (PCR) 28 in the attestation document in the request. PCR28 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR29 String

Filters access by the platform configuration register (PCR) 29 in the attestation document in the request. PCR29 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR3 String

Filters access by the platform configuration register (PCR) 3 in the attestation document in the request. PCR3 is a contiguous measurement of the IAM role assigned to the parent instance

kms:RecipientAttestation:PCR30 String

Filters access by the platform configuration register (PCR) 30 in the attestation document in the request. PCR30 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR31 String

Filters access by the platform configuration register (PCR) 31 in the attestation document in the request. PCR31 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR4 String

Filters access by the platform configuration register (PCR) 4 in the attestation document in the request. PCR4 is a contiguous measurement of the ID of the parent instance

kms:RecipientAttestation:PCR5 String

Filters access by the platform configuration register (PCR) 5 in the attestation document in the request. PCR5 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR6 String

Filters access by the platform configuration register (PCR) 6 in the attestation document in the request. PCR6 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR7 String

Filters access by the platform configuration register (PCR) 7 in the attestation document in the request. PCR7 is a custom PCR that can be defined by the user for specific use cases

kms:RecipientAttestation:PCR8 String

Filters access by the platform configuration register (PCR) 8 in the attestation document in the request. PCR8 is a measure of the signing certificate specified for the enclave image file

kms:RecipientAttestation:PCR8:ServiceName
kms:RecipientAttestation:PCR9 String

Filters access by the platform configuration register (PCR) 9 in the attestation document in the request. PCR9 is a custom PCR that can be defined by the user for specific use cases

Example IAM policy

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

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

Related actions in kms

View all kms actions →