【问题标题】:Message "Did not have IAM permissions to process tags on AWS::KMS::Key resource" When Creating KMS Key Using Cloudformation使用 Cloudformation 创建 KMS 密钥时出现消息“没有 IAM 权限来处理 AWS::KMS::Key 资源上的标签”
【发布时间】:2018-08-03 02:21:31
【问题描述】:

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

没有 IAM 权限来处理 AWS::KMS::Key 资源上的标签

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/*"

【问题讨论】:

    标签: amazon-web-services amazon-cloudformation amazon-iam amazon-kms


    【解决方案1】:

    我的角色缺少以下操作:

    - kms:TagResource
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-07-27
      • 1970-01-01
      • 2020-01-15
      • 2020-07-04
      • 2020-05-06
      • 2019-11-18
      • 2019-06-22
      相关资源
      最近更新 更多