PARALLAX

s3_cors

Manage CORS for S3 buckets in AWS

Collection: community.aws

Full Name: community.aws.s3_cors

Synopsis

Manage CORS for S3 buckets in AWS

Parameters

NameTypeRequiredDefaultDescription
access_keystr
aws_ca_bundlepath
aws_configdict
debug_botocore_endpoint_logsboolfalse
endpoint_urlstr
namestryes
profilestr
regionstr
ruleslist
secret_keystr
session_tokenstr
statestryes
validate_certsbooltrue

Example

yaml
# Create a simple cors for s3 bucket
- name: Manage CORS for S3 buckets in AWS
  community.aws.s3_cors:
    name: mys3bucket
    state: present
    rules:
        - allowed_origins:
            - http://www.example.com/
          allowed_methods:
            - GET
            - POST
          allowed_headers:
            - Authorization
          expose_headers:
            - x-amz-server-side-encryption
            - x-amz-request-id
          max_age_seconds: 30000

# Remove cors for s3 bucket
- name: Manage CORS for S3 buckets in AWS
  community.aws.s3_cors:
    name: mys3bucket
    state: absent
Search
    ↑ ↓ move↵ openesc close