An IAM user's StartInstances request for an existing EC2 instance is accepted, but the instance returns to Stopped with Client.InvalidKMSKey. The attached EBS volume uses an enabled AWS-managed KMS key. A correlated CloudTrail CreateGrant event identifies an explicit deny in the user's identity policy. Both requestParameters and responseElements are null, and no encoded authorization failure or matched statement is reported.
The policy has no date-based conditions. Removing earlier date conditions did not resolve this failure. The instance remains stopped; we are not removing restrictions or retrying starts to discover which condition fails.
The CreateGrant Allow is restricted to one key, one volume and one instance. Its conditions have this shape. All values in angle brackets are placeholders, not real identifiers or a deployable policy:
{
"StringEquals": {
"kms:CallerAccount": "<account-id>",
"kms:ViaService": "ec2.<region>.amazonaws.com",
"kms:GrantConstraintType": "EncryptionContextSubset",
"kms:EncryptionContext:aws:ebs:id": "<volume-id>",
"kms:GranteePrincipal": "arn:aws:sts::<account-id>:assumed-role/aws:ec2-infrastructure/<instance-id>"
},
"Bool": {
"kms:GrantIsForAWSResource": "true"
},
"ForAllValues:StringEquals": {
"kms:GrantOperations": ["Decrypt", "CreateGrant"]
},
"Null": {
"kms:GrantOperations": "false"
}
}
Separate Deny statements reject a wrong key and each missing or mismatched StringEquals value. Another Deny uses BoolIfExists=false for kms:GrantIsForAWSResource. ForAnyValue:StringNotEquals rejects grant operations outside the Allow's ceiling, and Null=true rejects missing grant operations.
A historical administrator Start of the same instance produced a successful CreateGrant with the expected EC2 infrastructure assumed-role grantee, operations [Decrypt], and an EncryptionContextSubset containing the expected volume ID. Those parameters fit the intended limits. They do not establish the failed IAM user's evaluated authorization context.
Current AWS documentation explicitly supports encryption-context conditions for CreateGrant. EBS documentation also specifies the STS infrastructure assumed-role grantee format used above:
- KMS permissions, CreateGrant row
- Using encryption context condition keys
- KMS condition keys
- EBS requirements, permissions for instances
Questions:
- For EC2/EBS CreateGrant, how are Constraints.EncryptionContextSubset entries exposed through kms:EncryptionContext:<key>, and is their presence guaranteed for the internal request made when starting an existing encrypted instance?
- Does kms:GranteePrincipal evaluate the complete STS assumed-role session ARN sent as GranteePrincipal, including the EC2 infrastructure instance session?
- Is there a documented read-only method to recover the matched Deny or actual authorization-context values when CloudTrail omits failed request parameters and there is no encoded authorization message?
We understand that supplying hypothetical context to the IAM simulator tests those supplied values, not the hidden context of this actual service request. We are seeking documented semantics or a non-mutating diagnostic, not a broader policy, a grant-creation experiment or a start retry with restrictions removed.