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

feat: s3 website #26

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

raykrishardi
Copy link
Contributor

Add the ability to enable static website hosting for s3 (either to redirect to another bucket or host static website)

Redirect to another bucket

buckets:
  normal-bucket:
    type: default
    website:
      redirect_requests: true
      redirect_hostname: "testbucket"
      redirect_protocol: "http"

Screenshot 2023-12-08 at 4 12 28 pm

Static website hosting

buckets:
  normal-bucket:
    type: default
    website:
      redirect_requests: false
      error_document: error.html
      index_document: index.html

Screenshot 2023-12-08 at 4 13 07 pm

Static website hosting with multiple redirection rules

buckets:
  normal-bucket:
    type: default
    website:
      redirect_requests: false
      error_document: error.html
      index_document: index.html
      routing_rules: 
      - redirect_rule:
          hostname: "test1"
          http_redirect_code: "301"
          protocol: "http"
          replace_key_with: "test1"
        routing_rule_condition:
          http_error_code_returned_equals: "400"
          key_prefix_equals: "test1"
      - redirect_rule:
          replace_key_prefix_with: "documents/"
        routing_rule_condition:
          key_prefix_equals: "docs/"

Screenshot 2023-12-08 at 4 13 29 pm

Copy link
Contributor

@tarunmenon95 tarunmenon95 left a comment

Choose a reason for hiding this comment

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

lgtm

@tarunmenon95 tarunmenon95 merged commit 1b92964 into theonestack:master Dec 8, 2023
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants