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 공식업데이트됨 일 년 전
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