使用 Cloudformation 创建 KMS 密钥时的消息 "Did not have IAM permissions to process tags on AWS::KMS::Key resource"
Message "Did not have IAM permissions to process tags on AWS::KMS::Key resource" When Creating KMS Key Using Cloudformation
使用 Cloudformation 创建新的 KMS 密钥时,我在 "Status Reason" 列中看到此消息:
Did not have IAM permissions to process tags on AWS::KMS::Key resource
cloudformation 堆栈似乎已正确创建,但我想知道如何才能防止显示此消息?
我正在使用以下 Cloudformation 模板创建 KMS 密钥:
AWSTemplateFormatVersion: "2010-09-09"
Description: "KMS key"
Outputs:
KeyArn:
Value: !Sub "${KmsKey.Arn}"
Resources:
KmsKey:
Properties:
Description: "KMS key"
Enabled: true
EnableKeyRotation: false
KeyPolicy:
Version: "2012-10-17"
Statement:
- Sid: "Enable IAM User Permissions"
Effect: "Allow"
Principal:
AWS: !Sub "arn:aws:iam::${AWS::AccountId}:root"
Action: "kms:*"
Resource: "*"
Type: "AWS::KMS::Key"
KmsKeyAlias:
Properties:
AliasName: "alias/KmsKey"
TargetKeyId: !Ref "KmsKey"
Type: "AWS::KMS::Alias"
我用来创建资源的角色允许执行以下操作:
- Action:
- kms:Create*
- kms:List*
Effect: "Allow"
Resource: "*"
- Action:
- kms:Describe*
- kms:Enable*
- kms:Put*
- kms:Update*
- kms:Get*
- kms:Decrypt
- kms:Encrypt
Effect: "Allow"
Resource:
- "arn:aws:kms:*:*:key/*"
我的角色缺少以下操作:
- kms:TagResource
使用 Cloudformation 创建新的 KMS 密钥时,我在 "Status Reason" 列中看到此消息:
Did not have IAM permissions to process tags on AWS::KMS::Key resource
cloudformation 堆栈似乎已正确创建,但我想知道如何才能防止显示此消息?
我正在使用以下 Cloudformation 模板创建 KMS 密钥:
AWSTemplateFormatVersion: "2010-09-09"
Description: "KMS key"
Outputs:
KeyArn:
Value: !Sub "${KmsKey.Arn}"
Resources:
KmsKey:
Properties:
Description: "KMS key"
Enabled: true
EnableKeyRotation: false
KeyPolicy:
Version: "2012-10-17"
Statement:
- Sid: "Enable IAM User Permissions"
Effect: "Allow"
Principal:
AWS: !Sub "arn:aws:iam::${AWS::AccountId}:root"
Action: "kms:*"
Resource: "*"
Type: "AWS::KMS::Key"
KmsKeyAlias:
Properties:
AliasName: "alias/KmsKey"
TargetKeyId: !Ref "KmsKey"
Type: "AWS::KMS::Alias"
我用来创建资源的角色允许执行以下操作:
- Action:
- kms:Create*
- kms:List*
Effect: "Allow"
Resource: "*"
- Action:
- kms:Describe*
- kms:Enable*
- kms:Put*
- kms:Update*
- kms:Get*
- kms:Decrypt
- kms:Encrypt
Effect: "Allow"
Resource:
- "arn:aws:kms:*:*:key/*"
我的角色缺少以下操作:
- kms:TagResource