s3_website
Configure an s3 bucket as a website
Collection: community.aws
Full Name: community.aws.s3_website
Synopsis
Configure an s3 bucket as a website
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| access_key | str | |||
| aws_ca_bundle | path | |||
| aws_config | dict | |||
| debug_botocore_endpoint_logs | bool | false | ||
| endpoint_url | str | |||
| error_key | str | |||
| name | str | yes | ||
| profile | str | |||
| redirect_all_requests | str | |||
| region | str | |||
| secret_key | str | |||
| session_token | str | |||
| state | str | yes | ||
| suffix | str | index.html | ||
| validate_certs | bool | true |
Example
yaml
- name: Configure an s3 bucket to redirect all requests to example.com
community.aws.s3_website:
name: mybucket.com
redirect_all_requests: example.com
state: present
- name: Remove website configuration from an s3 bucket
community.aws.s3_website:
name: mybucket.com
state: absent
- name: Configure an s3 bucket as a website with index and error pages
community.aws.s3_website:
name: mybucket.com
suffix: home.htm
error_key: errors/404.htm
state: present