Skip to main content

s3same

s3same (“sesame”, like “open sesame”) creates unique-per-repo AWS credentials for Travis CI artifact uploading to S3 and encrypts those credentials with the repo’s public key.

Installation

Running the command

sudo pip install s3same

will install the latest stable release of s3same as a command in /usr/local/bin.

Usage

$ s3same --help
Usage: s3same [OPTIONS] REPO

Options:
  --pro               Use Travis CI Pro
  --github TEXT       GitHub token
  --owner TEXT        GitHub owner
  --s3-bucket TEXT    S3 bucket for artifacts
  --aws-region TEXT   AWS region
  --aws-key TEXT      AWS key
  --aws-secret TEXT   AWS secret
  --aws-profile TEXT  AWS profile
  --nuke              Nuke the entire s3same setup on IAM
  --help              Show this message and exit.

Let’s assume you’ve got your AWS credentials in `~/.aws/credentials <http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-config-files>`__. Go to your GitHub settings and create a personal access token for s3same (the token must have the repo permission). Create ~/.s3same with:

GITHUB_TOKEN=put your token here
S3_BUCKET=the bucket to which artifacts will be uploaded
AWS_PROFILE=some profile
AWS_REGION=your AWS region

If your AWS credentials are in the default profile, you can omit the AWS_PROFILE line.

With all the credentials in place, running

$ s3same some-repo-name --owner some-user --pro

will create an AWS IAM user unique to the repo (s3same_travis__some-user__some-repo-name), add that user to the s3same_travis AWS IAM group (creating the group if it doesn’t exist) to give it the necessary permissions (defined by the s3same_travis policy, which will be created if it doesn’t exist), generate an AWS key and secret for that user, use the public key for the given repo on Travis CI to encrypt the key and secret, and print out the YAML snippet to use for artifact uploading credentials.

Configuration

Several configuration parameters can be specified by the environment, in the ~/.s3same file, or on the command line. The name/syntax for environment variables and within the ~/.s3same file are the same. Anything in the ~/.s3same file overrides the corresponding environment variable and anything passed as a command-line parameter overrides the environment variables and the ~/.s3same file. Setting an AWS key/secret pair overrides specifying an AWS configuration profile.

Parameter

Variable Name

Command-Line

GitHub Token

GITHUB_TOKEN

--github

GitHub Owner

GITHUB_OWNER

--owner

S3 Bucket

S3_BUCKET

--s3-bucket

AWS Region

AWS_REGION

--aws-region

AWS Key

AWS_ACCESS_KEY_ID

--aws-key

AWS Secret

AWS_SECRET_ACCESS_KEY

--aws-secret

AWS Profile

AWS_PROFILE

--aws-profile

Metadata

Release files for s3same 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for s3same 0.1
File Size Uploaded
s3same-0.1.tar.gz 6.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for s3same 0.1
File Interpreter ABI Platform
s3same-0.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 15.3 kB

Release files / s3same-0.1.tar.gz

Download URL s3same-0.1.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4c9f3c726c3ed03de711b9ca35e691b80560102cd525b192996bb817cfa05931
BLAKE2b-256 checksum
How to use checksums
890dd16597dc756cf50d6d782eb9c967f0cb51a8bb8fee6a67abab0e99a7e90d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / s3same-0.1-py2.py3-none-any.whl

Download URL s3same-0.1-py2.py3-none-any.whl
Size 8.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
b5187d189292e189051d1c4fb5868968274b6a6c5d380c861ef52a8a45961463
BLAKE2b-256 checksum
How to use checksums
7ea2a7ed5bd1222ab9223d881e655e874609a1a01de9ba0de483f2b5dbb223b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page