amazon-web-services - What user am I when I upload a file to a S3 bucket with the AWS CLI?
问题描述
I'm learning AWS
using the AWS
CLI and LocalStack
.
I'm working with tutorials such as this, which describe how to create a S3
bucket and upload a file to it.
What I'd like to understand is the role of users in relation to AWS
commands, and whether or not there is a relationship between a user and a profile (the latter is created when you run the aws configure
CLI command).
When I run a AWS
CLI command such as aws --endpoint-url=http://localhost:4572 s3 cp ./foo.json s3://my-bucket/path/to/foo.json
what user am I running that command as? I have not explicitly created any users using the AWS IAM
CLI or by other means. Is a profile implicitly a user? I.e. when I run aws configure
, does the default
profile created mean a user named default
is created in AWS IAM
?
解决方案
嗯,实际上很容易检查。
https://docs.aws.amazon.com/cli/latest/reference/sts/get-caller-identity.html
个人资料是否隐含用户?
不,配置文件就是这样 - 凭据配置文件。无论是用户还是角色,只要这些凭证有效,AWS CLI 就不会在意。
当我运行 aws configure 时,创建的默认配置文件是否意味着在 AWS IAM 中创建了一个名为 default 的用户
从上一点开始,不。IAM 中没有隐含地做任何事情。当您运行时,aws configure
您提供已经存在的凭据,而不是相反。
推荐阅读
- javascript - “字符串”类型的参数不能分配给“AbstractControl”类型的参数。角反应形式
- sql - 在 Access 2003 中从 SQL 存储过程创建动态报表
- sql - 如何在 SQL INSERT 中使用整数变量
- extjs - Sencha 键控多对一关系,具有复杂的(命名空间)名称
- c - 如何将 IPv4 地址转换为十进制
- c# - 如何在 .NET Framework 4.6.1 中使用 IActionResult?
- java - 使用詹金斯发送电子邮件得到以下错误响应
- validation - 无法显示验证消息-Angular 6
- android - Braintree PayPal Sandbox 不断重定向
- javascript - jquery click toggle - 单击另一个元素时关闭一个元素