CircleCI S3 upload (Updated for 2.0)

Zach Waterfield
Feb 17, 2017 · 2 min read
- aws s3 sync ${source}/ s3://${bucket} --region us-west-2

CircleCI 1.0

deployment:
development:
branch: development
commands:
- npm run build
- aws s3 sync ${source}/ s3://${bucket} --region us-west-2
production:
branch: master
commands:
- npm run build
- aws s3 sync ${source}/ s3://${bucket} --region us-west-2

CircleCI 2.0

version: 2
jobs:
build:
working_directory: ~/circle-tmp-folder
steps:
... # build/dependancies
- run:
name: build
command: 'yarn build'
deploy:
machine:
enabled: true
working_directory: ~/circle-tmp-folder
steps:
- run:
name: Deploy
command: 'aws s3 sync ${source}/ s3://${bucket} --region us-west-2'

Zach Waterfield

Written by

Co-Founder of padpiper.com | Full Stack Developer | CompEng grad from UWaterloo

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade