Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it.

I'm building Node.js Lambda functions using node-lambda that allows for development and testing in a local environment.

In a simple example by adding following bitbucket-pipelines.yml into the project repository my Lambda function gets deployed on every push. I am using environment variables feature to populate $AWS_ACCESS_KEY and $AWS_SECRET_KEY.

1 comment

The problem with node-lambda is that is does not yet support Lambdas versioning and aliases, which we use to manage environments rather than separately named functions. In our test environment, test apps call functions with a test qualifier. Therefore we use grunt-aws-lambda as it does support this feature.

We also use the tags feature in pipelines, which allow us to trigger a deployment based on a certain tag.