Deploy Provider for S3

aws

#1

Would be great to have a simple deploy option for pushing files to an S3 bucket. I’m aware of the CodeDeploy provider - a bit overkill for uploading a few static files to S3.

For example, thing about a Jekyll generated website. I don’t need an EC2 instance to host the generated files - just an S3 bucket.


#2

You should be able to use the awscli to send things to S3, have you tried this?


#3

Yep, seen examples with pip install awscli and aws s3 cp .... Could be good enough, but, also seems like an incredibly common need to put artifacts on s3.

What makes CircleCI so powerful to me is the minimal amount of shell scripting, or even yaml, to do common tasks.


#4

So aws s3 cp ... should work right out of the box :slight_smile:


#5

Hi, when I try to deploy to AWS S3 I get this:

deployment.branch should be a either a deploy section with commands, a Heroku deploy section or a CodeDeploy deploy section.

My circle.yml file:

machine:
  node:
    version:  4.2.0

dependencies:
  override:
    - npm install
    - bundle install
    - sudo pip install awscli
    
    cache_directories:
    - "node_modules"

deployment:
 aws:
  branch: master
  commands:
- ./sh/deploy_staging.sh

Within my sh script i have:

#!/usr/bin/env bash
DEFAULT="default"
PROFILE=${AWS_PROFILE:-$DEFAULT}
BUCKET=d.salisapp.com
DIR=/
aws  s3  sync $DIR s3://$BUCKET/ --profile "$PROFILE"

#6

Looks like a typo. The last line should be 4 spaces away from the commands line.

commands:
    - ./sh/deploy_staging.sh

#7

100% agree with steve-jansen. It is a very common need and Circle CI is here to make our life easier right :wink:

I have dozens of repo that need that…self scripting is of course an option but not very convenient.

:slight_smile:


#8