Can I get a user's s3 canonical ID from the command line?
I'm creating special-purpose users for Amazon S3 access, for example to give out to a third-party service. The accounts don't have an email address or password. I was hoping I'd be able to pull the canonical ID of these accounts using the aws command-line tool.
One way I have read about is to create a bucket using their account, look at the acl for it, and extract the canonical ID from that, then delete the useless bucket and move on.
But for future use, is there an easier way?
If you run:
aws iam list-users
You get a list of all of your IAM users. One of the fields is UserId, which is defined as "The stable and unique string identifying the user".
If that is what you are looking for, then you can retrieve it with:
aws iam get-user --user-name <iam user name> --query 'User.UserId'
链接地址: http://www.djcxy.com/p/59954.html
上一篇: Xervmon的Amazon凭证
下一篇: 我可以从命令行获取用户的s3规范ID吗?