Hi,

Nice post, thanks!

You may completely skip the CodeDeploy. It also helps if you run some integration tests that use AWS.

  1. Create a user in AWS that can execute sls deploy (an admin usually)
  2. Create secret environment variables in CircleCI and create a default aws profile as part of .circleci/config.yml
  3. just run npm run deploy:{stage} —it is up to you how you script your deployment.

For continuous deployment I have got:

npm run deploy:dev that runs after tests pass on the master build.npm run deploy:prod that runs after the tests pass on the release build.

Plus another best practice ;) don’t let merge into master/release when a feature branch is not green. Github calls it protected branches.

Building the future, team visibility advocate

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store