[英]How to interact with multiple S3 bucket from a single docker container?
I have a case of making multiple s3 buckets interact with each other from a docker container.我有一个使多个 s3 存储桶从 docker 容器相互交互的案例。 For example I have an s3 bucket named ABCD and another named EFGH.
例如,我有一个名为 ABCD 的 s3 存储桶和另一个名为 EFGH 的存储桶。 Now I want to build a docker container inside which I need to copy data from ABCD to EFGH or in general do all the read write operations.
现在我想构建一个 docker 容器,我需要在其中将数据从 ABCD 复制到 EFGH,或者通常执行所有读写操作。 I have role based access to these buckets as well as I have credentials like aws acess keys available.
我对这些存储桶具有基于角色的访问权限,并且我拥有可用的 aws 访问密钥等凭证。 I am able to do this from my local machine but now need it to be done from the container
我可以从我的本地机器上执行此操作,但现在需要从容器中完成
Using access keys in your container is a very bad approach, you should never use this.在您的容器中使用访问密钥是一种非常糟糕的方法,您永远不应该使用它。
In your case, I would suggest, deploying your docker using ECS by creating a task definition that uses your docker image, and in your task definition, you can give the task execution role
permissions to use your S3 buckets.在你的情况下,我建议,通过创建一个使用你的 docker 图像的任务定义,使用 ECS 部署你的 docker,并且在你的任务定义中,你可以授予
task execution role
使用你的 S3 存储桶的权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.