是否有任何参数可以从 EC2 参数存储作为环境变量传递到 ECS 任务?
AWS 为我们提供了
1) 一种存储参数(秘密和不太秘密)的方法
2) 一种在 ECS 任务内设置环境变量的方法
,但无法连接到 - 或者我错过了什么?
这里描述了一个解决方案,您将 docker 映像包装在您自己的映像中,以便能够加载参数。如果这是推荐的方式,那么我将不得不包装来自 Docker Hub 的所有图像,否则我可以将其用作库存图像,并且除了通过环境变量配置它们之外不执行任何操作。
我觉得这迫使我承担不必要的 Docker 镜像编码、维护、存储等责任,否则我只需要设置环境变量。
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 …