bash - Setting AWS CLI Profile to issue bash commands against AWS
问题描述
I am trying to setup the AWS env variables for AWS profiles before I run a bash script.
If do:
export profile=$(AWS_PROFILE=name)
aws configure list
and then I echo $profile
it isn't setting the profile.
解决方案
你可以使用:
export AWS_PROFILE=rodney
<call script here>
或者,您可以在脚本中指定配置文件:
aws s3 ls --profile rodney
推荐阅读
- r - 反码函数,处理引号
- android - Socket 和 SSLSocket 在同一个端口上运行
- reactjs - 如何在 package.json 中链接 css:watch 和 babel
- android - 将国家名称转换为 ISO Alpha 2 国家代码
- java - spring-boot 执行器健康检查事件
- android - 如何更改XML文件android studio中的字体
- javascript - 如何在 ng-repat 中保存元素的索引?
- python - Python : How to easily track the module/function definition in big package
- cassandra - CQL 查询字符串的最大长度
- ios - UITableView:自动滚动给定行到屏幕顶部或底部