Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-s3-website: add page #11642

Merged
merged 7 commits into from
Dec 3, 2023
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions pages/common/aws-s3-website.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# aws-s3-website

> Set the website configuration for a bucket.
> See also: `aws s3`.
> More information: <https://docs.aws.amazon.com/cli/latest/reference/s3/website.html>.

- Configure a bucket as a static website:

`aws s3 website {{s3://bucket-name/}} --index-document {{index.html}}`

- Configure an error page for the website:

`aws s3 website {{s3://bucket-name/}} --index-document {{index.html}} --error-document {{error.html}}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Configure a bucket as a static website:
`aws s3 website {{s3://bucket-name/}} --index-document {{index.html}}`
- Configure an error page for the website:
`aws s3 website {{s3://bucket-name/}} --index-document {{index.html}} --error-document {{error.html}}`
- Configure a bucket as a static website:
`aws s3 website {{s3://bucket-name/}} --index-document {{path/to/index.html}}`
- Configure an error page for the website:
`aws s3 website {{s3://bucket-name/}} --index-document {{path/to/index.html}} --error-document {{path/to/error.html}}`

I know nothing about s3, but I suspect that the command expects a file path in the specified locations. Is that correct? If that's the case, we can spell it out in the tldr page.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, I am pretty sure it doesn't require path, will manually check it and get back.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, passing the path to this command will not work. It's been a while since I used AWS (so I had to do a quick test in the cloud shell).

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For bucket name, we don't need a trailing backslash, other than that, this PR is GTG.

Suggested change
- Configure a bucket as a static website:
`aws s3 website {{s3://bucket-name/}} --index-document {{index.html}}`
- Configure an error page for the website:
`aws s3 website {{s3://bucket-name/}} --index-document {{index.html}} --error-document {{error.html}}`
- Configure a bucket as a static website:
`aws s3 website {{s3://bucket-name}} --index-document {{index.html}}`
- Configure an error page for the website:
`aws s3 website {{s3://bucket-name}} --index-document {{index.html}} --error-document {{error.html}}`