Notify rollbar about a new deployment on Elastic Beanstalk
npm install
Ceate an IAM role with the following policy:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:*:*:*"
},
{
"Action": [
"elasticbeanstalk:DescribeEnvironments"
],
"Effect": "Allow",
"Resource": [
"*"
]
}
]
}
Setup node-lambda and edit the generated .env
file:
node_modules/.bin/node-lambda setup
editor .env
cp config.example.json
editor config.json
Use your Elastic Beanstalk application name as key and enter a Rollbar Project Access token with write privileges.
The environment
field can be a single Rollbar environment (string) or an
object mapping Elastic Beanstalk environments to Rollbar environments.
Note that you can use the same lambda for multiple applications by mutiple application sections to the configuration.
Note that if an application is not in the configuration or an environment isn't mapped, the Lambda will result in a failure, which has no consequences when triggered by SNS.
node_modules/.bin/node-lambda run
npm test
node_modules/.bin/node-lambda deploy