当我使用 AWS CLI 将文件上传到 S3 存储桶时,我是什么用户?
What user am I when I upload a file to a S3 bucket with the AWS CLI?
我正在学习 AWS
使用 AWS
CLI 和 LocalStack
。
我正在使用 this 等教程,其中介绍了如何创建 S3
存储桶并将文件上传到其中。
我想了解的是用户在 AWS
命令中的作用,以及用户和配置文件之间是否存在关系(后者是在您 运行 aws configure
CLI 命令)。
当我 运行 一个 AWS
CLI 命令,例如 aws --endpoint-url=http://localhost:4572 s3 cp ./foo.json s3://my-bucket/path/to/foo.json
我是哪个用户 运行 正在使用该命令? 我没有使用 AWS IAM
CLI 或其他方式明确创建任何用户。 个人资料是否隐含用户? 即当我 运行 aws configure
时,创建的 default
配置文件是否意味着在 AWS IAM
中创建了一个名为 default
的用户?
嗯,其实很容易查。
https://docs.aws.amazon.com/cli/latest/reference/sts/get-caller-identity.html
Is a profile implicitly a user?
不,配置文件就是 - 凭据配置文件。无论是用户还是角色,AWS CLI 都不会关心,只要这些凭证有效即可。
when I run aws configure, does the default profile created mean a user named default is created in AWS IAM
从上一点开始,不。 IAM 中没有隐式执行任何操作。当您 运行 aws configure
您提供的凭据已经存在,而不是相反。
我正在学习 AWS
使用 AWS
CLI 和 LocalStack
。
我正在使用 this 等教程,其中介绍了如何创建 S3
存储桶并将文件上传到其中。
我想了解的是用户在 AWS
命令中的作用,以及用户和配置文件之间是否存在关系(后者是在您 运行 aws configure
CLI 命令)。
当我 运行 一个 AWS
CLI 命令,例如 aws --endpoint-url=http://localhost:4572 s3 cp ./foo.json s3://my-bucket/path/to/foo.json
我是哪个用户 运行 正在使用该命令? 我没有使用 AWS IAM
CLI 或其他方式明确创建任何用户。 个人资料是否隐含用户? 即当我 运行 aws configure
时,创建的 default
配置文件是否意味着在 AWS IAM
中创建了一个名为 default
的用户?
嗯,其实很容易查。
https://docs.aws.amazon.com/cli/latest/reference/sts/get-caller-identity.html
Is a profile implicitly a user?
不,配置文件就是 - 凭据配置文件。无论是用户还是角色,AWS CLI 都不会关心,只要这些凭证有效即可。
when I run aws configure, does the default profile created mean a user named default is created in AWS IAM
从上一点开始,不。 IAM 中没有隐式执行任何操作。当您 运行 aws configure
您提供的凭据已经存在,而不是相反。