简体   繁体   English

如何使用 CloudFormation 从别名获取 AWS SSM 密钥 Arn?

[英]How to get an AWS SSM Key Arn from an Alias using CloudFormation?

Is it possible to get a KMS Key ARN using CloudFormation using an alias?是否可以使用 CloudFormation 使用别名获取 KMS 密钥 ARN? I want to give specific permissions to a Key in my AWS Account.我想为我的 AWS 账户中的密钥授予特定权限。

Something like the following?像下面这样的?

  - Effect: Allow
    Action: kms:Decrypt
    Resource:
      - 'Fn::GetAtt': 
        - 'alias/someAliasOfAKMSKey'
        - 'arn'

You can do something like this:你可以这样做:

- Effect: Allow
  Action:
  - kms:Decrypt
  Resource:
  - !Sub 'arn:aws:kms:${AWS::Region}:${AWS::AccountId}:key/someKeyNameOfAKMSKey'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 CloudFormation 中获取 SSM 文档的 ARN? - How to get the ARN of an SSM Document in CloudFormation? 使用 cloudformation 部署时如何获取 AWS Api 网关的 arn - How to get arn of AWS Api gateway when deploying with cloudformation AWS CloudFormation:如何获取 DynamoDB GlobalTable 副本的 stream ARN? - AWS CloudFormation: How to get stream ARN of DynamoDB GlobalTable replica? 如何获取新创建的 aws_cloudformation_stack 的 arn terraform - How to get the arn of a newly created aws_cloudformation_stack terraform 如何使用 CloudFormation 创建具有 DocumentType 包的“AWS::SSM::Document” - How to create an 'AWS::SSM::Document' with DocumentType of Package using CloudFormation 如何使用CloudFormation基于现有ARN创建AWS资源? - How to create AWS resources based on an existing ARN using CloudFormation? 使用 ansible 并使用 aws 配置文件或 arn 获取 AWS SSM 参数 - Fetch AWS SSM Parameter using ansible and using aws profile or arn 如何使用 AWS SDK 从 ARN 字符串中获取资源标识符? - How to get resource identifier from ARN string using AWS SDK? 如何使用 cloudformation 从 S3 ARN 获取 S3 存储桶名称 - How to get S3 bucket name from S3 ARN using cloudformation 如何在CloudFormation中生成AWS根账户ARN? - How to generate the AWS root account ARN in CloudFormation?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM