How to do it...

  1. Create the project from the following template:
$ sls create --template-url https://github.com/danteinc/js-cloud-native-cookbook/tree/master/ch7/datadog-account --path cncb-datadog-account
  1. Navigate to the cncb-datadog-account directory with cd cncb-datadog-account.
  2. Review the file named serverless.yml with the following content:
service: cncb-datadog-account...resources:  Resources:    DatadogAWSIntegrationPolicy:       Type: AWS::IAM::ManagedPolicy      Properties:        PolicyDocument: ${file(includes.yml):PolicyDocument}    DatadogAWSIntegrationRole:      Type: AWS::IAM::Role      Properties:         RoleName: DatadogAWSIntegrationRole        AssumeRolePolicyDocument:          Statement:            Effect: Allow            Principal:              AWS: arn:aws:iam::464622532012:root Action: sts:AssumeRole ...

Get JavaScript Cloud Native Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.