Update: CodePipeline now has built-in support for both Lambda and OpsWorks so you should take a look at the built-in functionality before using this project.
This is a Lambda function which allows you to deploy to OpsWorks using CodePipeline by implementing a custom action.
You can find a full guide on setting it up on my blog
When configured you can use it just like the inbuilt stage actions:
It uses S3 put notifications to trigger the Lambda function, then SNS retries to implement polling.
Here's a general diagram of how it works:
You might find the following two grunt functions useful:
grunt lambda_invoke_monitor
grunt lambda_invoke_task
You may also want to monitor the two event_something.json files to reference resources within your own account.
Finally, if you're using this as a base for another action you might want to change the buildProvider
variable in
lib/handle_job.js
to a different name.