AWS: Configure S3 Artifacts

Configuring S3 as an Artifact Source

If you want to use a file from S3 in your pipeline, you’ll need to configure S3 as an artifact source. This is how you would, for example, reference a Helm chart tarball for later use during deployment.

This is just a quick walkthrough of how to configure your Spinnaker to access an S3 bucket as a source of artifacts. Many of the commands below have additional options that may be useful (or possibly required). If you need more detailed help, take a look at the Halyard command reference

Enable S3 Artifacts

If you haven’t done this yet (for example, if you’ve just installed Armory Spinnaker fresh), you’ll need to enable S3 as an artifact source:

hal config features edit --artifacts true
hal config artifact s3 enable

Add S3 Account

You only need to configure the S3 credentials as an account – all buckets that account has access to can be referenced after that.

hal config artifact s3 account add my-s3-account \
  --region us-west-2 \
  --aws-access-key-id ABCDEF01234... \
  --aws-secret-access-key # Will be prompted for this interactively

NOTE: If you are running Armory 2.1.x or earlier, the AWS secrets configured with halyard above will not work as-is; you’ll want to create/edit the file ~/.hal/default/service-settings/clouddriver.yml and add the credentials as environment variables:

  AWS_SECRET_ACCESS_KEY: LXabcdef012345...

Detailed information on all command line options can be found here

Don’t forget to hal deploy apply your changes.