Skip to main content

AWS KMS ExecModule

Overview​

AwsKmsModule reads key metadata from AWS Key Management Service (AWS KMS). Use it to build a regional key inventory, check whether a key referenced by an application is enabled, or enrich an audit record with the key's state, manager, specification, and intended usage.

The inventory pairs each key ID with its ARN. Use the ARN to correlate keys with application or storage configuration across accounts and regions. A key's reported state is one input to an access review. Verify the application's permissions separately.

Usage​

  1. Create an AWS KMS connection in the Integration Account Console. Verify the connection and confirm its status is READY.
  2. In Workflow Studio, add AWS KMS to a task and select the connection under General > Connection.
  3. Choose a region. Use List Keys to enumerate keys or Describe Key with an explicit ID or key ARN to inspect a known key.
  4. Check status before using the result. If hasMore is true, pass nextToken into the next List Keys invocation.

Inputs​

InputTypeRequiredDefaultPurpose
operationstringNolist_keyslist_keys or describe_key.
regionstringYes—Commercial AWS or AWS GovCloud region containing the key.
pageSizeintegerNo100Request 1–1,000 entries for a list page.
nextTokenstringNo—Opaque continuation token from the preceding list response.
keyIdstringFor lookups—A UUID, a multi-Region key ID (mrk- plus 32 hex digits), or a key ARN in the selected region and partition.

Leave keyId blank for List Keys and leave pagination inputs blank for Describe Key. Use the key ID or key ARN returned by the list operation. The module rejects aliases, including predefined AWS aliases that can cause AWS to create an AWS managed key.

Outputs​

OutputMeaning
statussuccess or error.
operation / regionRecognized operation and AWS region when available.
keysOne list page of records with keyId and arn.
keyNormalized metadata for one explicit key.
hasMore / nextTokenWhether AWS reports more list entries and the token to continue.
requestIdAWS request reference when available.
errorRedacted code, message, retryability, and HTTP status when available.

The detail record identifies the key by keyId and arn. When AWS returns them, it includes state, enabled, manager, spec, usage, origin, createdAt, and multiRegion.

IntegrationAccount Requirements​

Use a verified AWS KMS connection with account name AWS and status READY. Enter the key pair in the protected AWS Access Key ID and AWS Secret Access Key fields. The module signs requests with AWS Signature Version 4. The connection uses an access key pair without a session token.

Grant kms:ListKeys in IAM with resource * for enumeration. Allow kms:DescribeKey on the keys the workflow needs to inspect under the effective key and IAM policies. For an approved key in a different AWS account, use its full key ARN and grant permission in both accounts. AWS KMS key access and permissions

Configuration​

Choose the AWS region that contains the key. The module derives the standard regional HTTPS endpoint from that region. For a multi-account or multi-Region inventory, run separate list invocations for each connection and region. Keep the access key pair in the Integration Account fields.

Operations​

  • list_keys returns one page of key IDs and ARNs for the connection's account in the selected region. AWS ListKeys API
  • describe_key returns metadata for an existing key identified by explicit ID or key ARN. AWS DescribeKey API

Errors and Failure Modes​

  • A validation error calls for checking the operation, region, key ID or ARN, and list inputs.
  • A connection error calls for checking the Integration Account's verification, readiness, and protected credential fields.
  • For a missing key, check the key ID or ARN, account, and region. For an authorization error, check the relevant IAM and key policies. Use the returned request ID for investigation when available.
  • For a retryable provider or network error, keep concurrency low and back off between workflow attempts.

Example​

A deployment review can check the key ARN configured for a production storage system. Pass the ARN into Describe Key with its region.

{
"operation": "describe_key",
"region": "us-west-2",
"keyId": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab"
}

A successful lookup can return the following metadata.

{
"status": "success",
"operation": "describe_key",
"region": "us-west-2",
"key": {
"keyId": "1234abcd-12ab-34cd-56ef-1234567890ab",
"arn": "arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab",
"state": "Enabled",
"enabled": true,
"manager": "CUSTOMER",
"spec": "SYMMETRIC_DEFAULT",
"usage": "ENCRYPT_DECRYPT",
"origin": "AWS_KMS",
"multiRegion": false
}
}

Use arn to associate the check with the deployment review. Route a disabled key or an unexpected usage to the key owner for investigation.

Notes​

  • Keep the connection, region, and page size fixed while following a continuation token. AWS may return fewer results than requested. Use hasMore to decide when to stop.
  • Bound fan-out across accounts and regions. AWS KMS applies request quotas, and recent changes can take time to appear in metadata. AWS KMS request quotas
  • Both operations are read-only and safe to repeat. Key lifecycle changes, cryptographic operations, policy and grant management, and key material access are outside this connector's scope.