gpt4 book ai didi

amazon-web-services - 使用 Cloudformation 创建 KMS key 时出现消息 "Did not have IAM permissions to process tags on AWS::KMS::Key resource"

转载 作者:行者123 更新时间:2023-12-04 14:38:52 25 4
gpt4 key购买 nike

使用 Cloudformation 创建新的 KMS key 时,我在“状态原因”列中看到此消息:

Did not have IAM permissions to process tags on AWS::KMS::Key resource

cloudformation 堆栈似乎已正确创建,但我想知道如何防止显示此消息?

我使用以下 Cloudformation 模板来创建 KMS key :

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

关于amazon-web-services - 使用 Cloudformation 创建 KMS key 时出现消息 "Did not have IAM permissions to process tags on AWS::KMS::Key resource",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48940879/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com