You can find your AWS Access Keys in your Amazon Console. You should probably encrypt the secret key with the Travis CI command line:

travis encrypt --add deploy.secret_access_key

The previous example is almost certainly not ideal, as you probably want to upload your built binaries and documentation. Set skip_cleanup to true to prevent Travis CI from deleting your build artifacts.

Often, you don’t want to upload your entire project to S3. You can tell Travis CI to only upload a single folder to S3. You can use the local_dir option to do so. This example uploads the build directory of your project to S3:

Sometimes you want to run commands before or after releasing a gem. You can use the before_deploy and after_deploy stages for this. These will only be triggered if Travis CI is actually pushing a release.

S3 can take a content-type header. Normally this doesn’t include a character set as well. If you would like to add a character set, add the default_text_charset option with what you want it to be. For example: