This is a sample app that shows how to deploy Dynatrace via serverless
- Install Node.js
- Install serverless
npm install -g serverless
- Sett up AWS credentials as described in the serverless docu
- Install AWS CLI
- Use
aws configure
to set credentials and zone (us-east-1) - Open Dynatrace and make sure that Lambda support is enabled
- Click on 'Deploy Dynatrace', select 'Set up Serverless integration' and then 'Node.js'
- Copy the DT_LAMBDA_OPTIONS environment settings
- Paste the json into a file
.dynatrace-aws.json
- make sure it isn't committed (.gitignore is already set up) - In the terminal run
aws ssm put-parameter --name "/dynatrace/lambda/serverless-node-js/DT_LAMBDA_OPTIONS" --value "file://.dynatrace-aws.json" --type String --region us-east-1 --overwrite
The config path is arbitrary - it just needs to be consistent with the setting in serverless.yml, E.g.
DT_LAMBDA_OPTIONS: ${ssm:/dynatrace/lambda/serverless-node-js/DT_LAMBDA_OPTIONS}
- Run
serverless deploy
on the console.