简体   繁体   English

使用 CloudFormation 模板时如何为 AWS ECR 启用 KMS 加密

[英]How to enable KMS encryption for AWS ECR when using CloudFormation templates

Reading the AWS documentation regarding ECR CloudFormation template:阅读有关 ECR CloudFormation 模板的 AWS 文档:

See here . 见这里

I've not been able to find how to specify the encryption at rest you want.我无法找到如何在您想要的 rest 处指定加密。 I know by default it uses AES-256.我知道默认情况下它使用 AES-256。 But I want to be able to specify KMS.但我希望能够指定 KMS。 In simple terms my template looks like this:简单来说,我的模板如下所示:

Resources:
    logicalid:
        Type: 'AWS::ECR::Repository'
        Properties:
            RepositoryName : "repo-name"
            ImageScanningConfiguration:
                scanOnPush: "true"
            ImageTagMutability: "IMMUTABLE"
            EncryptionConfiguration:
                 encryptionType:"KMS"

But EncryptionConfiguration is not a valid option.但是 EncryptionConfiguration 不是一个有效的选项。 I assume there must be a way given that the SDK's allow you to specify it:我认为必须有一种方法,因为 SDK 允许您指定它:

See here 看这里

Any help would be much appreciated.任何帮助将非常感激。 Thanks!谢谢!

It is not supported yet .尚不支持 KMS encryption for ECR is rather new and CloudFormation does not have this option yet. ECR 的 KMS 加密是相当新的,CloudFormation 还没有这个选项。

The only way would be to create your ECR repo using custom resource in CloudFormation.唯一的方法是使用 CloudFormation 中的自定义资源创建您的 ECR 存储库。

AWS cloud formation now supports an option to specify KMS to have encryption at rest. AWS 云形成现在支持指定 KMS 在 rest 进行加密的选项。

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

相关问题 AWS cloudformation elasticsearch 加密在 rest(KMS 加密) - AWS cloudformation elasticsearch encryption at rest (KMS encryption) 使用 AWS KMS 的确定性加密 - Deterministic encryption using AWS KMS CloudFormation KMS加密问题 - CloudFormation KMS Encryption Questions 使用 AWS S3 KMS 加密时如何确保您的文件已加密? - How to make sure your files are encrypted when using AWS S3 KMS encryption? 如何在 S3 加密中启用 AWS 托管密钥 (aws/s3) 作为 AWS KMS 密钥 - How to enable AWS managed key (aws/s3) as a AWS KMS key in S3 encryption 使用 cloudformation 在 AWS ECR 中指定标签不变性 - specify tag immutability in AWS ECR using cloudformation 使用 sam deploy 和 CloudFormation 时如何检测 ECR 映像的变化 - How to detect changes in ECR image when using sam deploy and CloudFormation AWS 通过 cloudformation 启用 EBS 加密 - AWS Enable EBS Encryption via cloudformation 使用 CloudFormation 模板启用 AWS Security Hub - Enable AWS Security Hub with CloudFormation Templates 使用Cloudformation创建KMS密钥时,出现消息“没有IAM权限来处理AWS :: KMS :: Key资源上的标签” - Message “Did not have IAM permissions to process tags on AWS::KMS::Key resource” When Creating KMS Key Using Cloudformation
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM