- Add the
s3.py
file to your project. As an example, put it inside a folder calledpublishers
. - The folder where s3.py resides must be a Python package, so add an empty
__init__.py
file to that folder also. - Add the following configuration to your site.yaml and modify it as needed:
publisher:
s3:
type: publishers.s3.S3 # here, publishers is the folder where the s3.py file was placed
key: my_access_key_id
secret: my_secret_access_key
bucket: www.my-bucket-name.com
redirects:
- /source1.html => /destination1.html
- /source2.html => /destination2.html
The key
and secret
settings can be omitted and instead set as the environment variables AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
.
Using environment variables might be preferable as the configuration file can then be commited and made public without revealing the AWS credentials.