简体   繁体   English

从本地运行 AWS CLI,无需在本地存储凭证

[英]Run AWS CLI from local without storing credentials in local

How to run aws cli to download s3 bucket data without storing aws credential in local machine?如何运行 aws cli 下载 s3 存储桶数据而不将 aws 凭据存储在本地计算机中?

Please Note that s3 bucket is not a public bucket.请注意,s3 存储桶不是公共存储桶。

Not sure what your goal is, but you can use environment variables which you are only exporting for the current session/aws_cli run.不确定您的目标是什么,但您可以使用仅为当前会话/aws_cli 运行导出的环境变量

To prevent in bash (asuming you are using linux) that the export is written to history, you can use a space infront of the command.为了防止在 bash(假设您使用的是 linux)中将导出写入历史记录,您可以在命令前使用一个空格

You can start an EC2 instance and give that instance a role that allows it to read from your S3 bucket.您可以启动一个 EC2 实例并为该实例提供一个角色,以允许它从您的 S3 存储桶中读取数据。 Once started, connect to the EC2 instance using ssh and initiate your S3 transfer using aws s3 cp...ˋ or ˋaws s3 sync...启动后,使用 ssh 连接到 EC2 实例并使用aws s3 cp...ˋ or ˋaws s3 sync...启动您的 S3 传输aws s3 cp...ˋ or ˋaws s3 sync...

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

相关问题 使用 AWS CLI 将文件从本地上传到 s3,无需硬编码凭证(访问 ID 和秘密访问密钥) - upload file to s3 from local using AWS CLI without hard-coded credentials(access id and secret access key) 从本地 mac 连接的 AWS CLI 问题 - AWS CLI issues with connecting from local mac 在 AWS CLI 中从本地文件加载参数 - Load Parameter from Local File in AWS CLI 无法从本地计算机上的 /.aws/credentials 读取凭据 - Cannot read credentials from /.aws/credentials on local machine 在没有AWS CLI的情况下从本地docker容器访问S3存储桶 - Access S3 bucket from a local docker container without AWS CLI AWS CLI:将一定数量的文件从每个存储桶复制到本地 - AWS CLI: Copy certain number of files from each bucket to local 从S3到本地的AWS CLI同步因Errno 20而失败 - AWS CLI sync from S3 to local fails with Errno 20 如何从 .aws/credentials 为 aws cli 获取 AWS 凭证配置文件 - How to source AWS credentials profile from .aws/credentials for aws cli 如何在没有 AWS 账户和 Docker 的情况下在本地运行 lambda function? - How to run lambda function without AWS account and Docker on Local? 您如何从 ~/.aws/.credentials 和 ~/.aws/.config 文件中使用 boto3 列出本地配置文件? - How do you list local profiles with boto3 from ~/.aws/.credentials and ~/.aws/.config files?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM