2回答
- 新しい順
- 投票が多い順
- コメントが多い順
1
Hi, I would use
aws s3api get-bucket-location --bucket <BUCKET_NAME> --output text ====> <REGION>
and then use the <REGION> info to build the website string, which is pretty standard:
http://<BUCKET_NAME>.s3-website.<REGION>.amazonaws.com
Hope it helps ;)
aws cli should give the full url, just saying
I agree with you. It is unfortunate that it doesn’t support that
0
The existing answer is good but there is an (ugly but workable) alternative:
aws s3 presign s3://BUCKETNAME/a | awk '{split($1,a,"/"); print a[3]}'
Note that this doesn't make a call on the network - it's a completely local operation.
関連するコンテンツ
- AWS公式更新しました 2年前
- AWS公式更新しました 2年前
Have you enabled Static website hosting for S3 bucket? Can you also paste output of command you are running?
Normally , Depending on your Region, your Amazon S3 website endpoint follows one of these two formats.
-- s3-website dash (-) Region ‐ http://bucket-name.s3-website-Region.amazonaws.com
-- s3-website dot (.) Region ‐ http://bucket-name.s3-website.Region.amazonaws.com