小编Jon*_*tan的帖子

将 EC2 参数存储变量作为环境变量传递给 ECS 任务

是否有任何参数可以从 EC2 参数存储作为环境变量传递到 ECS 任务?

AWS 为我们提供了
1) 一种存储参数(秘密和不太秘密)的方法
2) 一种在 ECS 任务内设置环境变量的方法
,但无法连接到 - 或者我错过了什么?

这里描述了一个解决方案,您将 docker 映像包装在您自己的映像中,以便能够加载参数。如果这是推荐的方式,那么我将不得不包装来自 Docker Hub 的所有图像,否则我可以将其用作库存图像,并且除了通过环境变量配置它们之外不执行任何操作。

我觉得这迫使我承担不必要的 Docker 镜像编码、维护、存储等责任,否则我只需要设置环境变量。

amazon-web-services amazon-ecs docker

5
推荐指数
1
解决办法
5684
查看次数

Cross account S3 access through CloudFormation CLi

I am trying to create a CloudFormation Stack using the AWS CLI by running the following command:

aws cloudformation create-stack --debug --stack-name ${stackName} --template-url ${s3TemplatePath} --parameters '${parameters}' --region eu-west-1
Run Code Online (Sandbox Code Playgroud)

The template resides in an S3 bucket in the another account, lets call this account 456. The bucket policy:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "Example permissions",
            "Effect": "Allow",
            "Principal": {
                "AWS": [
                    "arn:aws:iam::123:root"
                ]
            },
            "Action": [
                "s3:*"
            ],
            "Resource": "arn:aws:s3:::cloudformation.template.eberry.digital/*"
        }
    ]
}
Run Code Online (Sandbox Code Playgroud)

("Action: * " is …

amazon-s3 amazon-web-services aws-cloudformation aws-cli

4
推荐指数
1
解决办法
2472
查看次数