Search code examples
aws-cloudformationaws-codebuildaws-codestar

AWS Codestar -- Build with node.js module dependencies


I'm using AWS Codestar. It integrates a number of AWS services so that I can go from git push to deployment.

It uses cloudformation. I have a lambda function that depends on the uuid npm.

How do I include this node dependency in the Codestar build pipeline? Cloudformation SAM use a zip file, and uploads everything to S3:

https://github.com/awslabs/serverless-application-model/blob/master/examples/2016-10-31/inline_swagger/template.yaml#L32

I don't want to build a zip file and put it into the code repo.

My next plan is to attempt running npm install in Codebuild:

http://docs.aws.amazon.com/codebuild/latest/userguide/sample-nodejs-hw.html#sample-nodejs-hw-files


Solution

  • Next plan works. Needed to add the npm in Codebuild. Works great.