CI/CD for static assets and Lambda function
This Gist is based on Building a continuous delivery pipeline for a Lambda application with AWS CodePipeline
Needed to build a NodeJS project, upload the static assets to an S3 bucket and also deploy a small Lambda function that lived in a subfolder.
The AWS Guide above will get you familiarized with the setup, but there are a couple of changes required on both the buildspec.yml and template.yml files.
You start at the root of your repo...which is nice.
Pre-build and build commands a pretty much self-explanatory.
For whatever reason the index.js, template.yml and outputtemplate.yml needed to be by themselves in a folder.
I had initially configured an Action in the Deploy stage that published the static assets to a static website hosting S3 Bucket. I removed it and used the aws s3 sync command instead.
Nothing out of the ordinary really.