Get ARN of S3 Bucket with aws cli

前端 未结 3 1617
温柔的废话
温柔的废话 2021-01-30 08:02

Is it possible to get the ARN of an S3 bucket via the AWS command line?

I have looked through the documentation for aws s3api ... and aws s3 ...

3条回答
  •  盖世英雄少女心
    2021-01-30 08:59

    It's always arn:PARTITION:s3:::NAME-OF-YOUR-BUCKET. If you know the name of the bucket and in which partition it's located, you know the ARN. No need to 'get' it from anywhere.

    The PARTITION will be aws, aws-us-gov, or aws-cndepending on whether you're in general AWS, GovCloud, or China resepectively.

提交回复
热议问题