s3_sync
Efficiently upload multiple files to S3
Collection: community.aws
Full Name: community.aws.s3_sync
Synopsis
Efficiently upload multiple files to S3
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| access_key | str | |||
| aws_ca_bundle | path | |||
| aws_config | dict | |||
| bucket | str | yes | ||
| cache_control | str | |||
| debug_botocore_endpoint_logs | bool | false | ||
| delete | bool | false | ||
| endpoint_url | str | |||
| exclude | str | .* | ||
| file_change_strategy | str | date_size | ||
| file_root | path | yes | ||
| include | str | * | ||
| key_prefix | str | |||
| mime_map | dict | |||
| mode | str | push | ||
| permission | str | |||
| profile | str | |||
| region | str | |||
| secret_key | str | |||
| session_token | str | |||
| storage_class | str | STANDARD | ||
| validate_certs | bool | true |
Example
yaml
- name: basic upload
community.aws.s3_sync:
bucket: tedder
file_root: roles/s3/files/
- name: basic upload using the glacier storage class
community.aws.s3_sync:
bucket: tedder
file_root: roles/s3/files/
storage_class: GLACIER
- name: basic individual file upload
community.aws.s3_sync:
bucket: tedder
file_root: roles/s3/files/file_name
- name: all the options
community.aws.s3_sync:
bucket: tedder
file_root: roles/s3/files
mime_map:
.yml: application/text
.json: application/text
key_prefix: config_files/web
file_change_strategy: force
permission: public-read
cache_control: "public, max-age=31536000"
storage_class: "GLACIER"
include: "*"
exclude: "*.txt,.*"