Installing Datadog Forwarder Manually in AWS

Create Datadog API Key

API keys page — https://app.datadoghq.com/account/settings#api
aws ssm put-parameter --name datadog-api-key --value $DD_API_KEY --type SecureString --key-id alias/aws/ssm --tier Standard
Parameter store in Paris — https://eu-west-3.console.aws.amazon.com/systems-manager/parameters

Create Datadog Forwarder S3 Cache Bucket

Example bucket in Paris — https://s3.console.aws.amazon.com/s3/home?region=eu-west-3

Create Datadog Forwarder IAM Role

Policy document for DatadogForwarderPolicy
aws iam create-policy --policy-name DatadogForwarderPolicy --policy-document file://datadog-forwarder-policy-document.json
Trust policy for DatadogForwarderRole
aws iam create-role --role-name DatadogForwarderRole --assume-role-policy-document '{"Version": "2012-10-17","Statement": [{ "Sid": "AllowAssumingRoleFromLambda", "Effect": "Allow", "Principal": {"Service": "lambda.amazonaws.com"}, "Action": "sts:AssumeRole"}]}'aws iam attach-role-policy --role-name DatadogForwarderRole --policy-arn arn:aws:iam::123456789012:policy/DatadogForwarderPolicy
IAM roles with policy attachments — https://console.aws.amazon.com/iam/home

Create Datadog Forwarder Lambda

aws lambda create-function --function-name datadog-forwarder --zip-file fileb://aws-dd-forwarder-3.39.0.zip --role arn:aws:iam::123456789012:role/DatadogForwarderRole --handler lambda_function.lambda_handler --runtime python3.7 --environment 'Variables={DD_API_KEY_SSM_NAME=datadog-api-key,DD_ENHANCED_METRICS=false,DD_FETCH_LAMBDA_TAGS=true,DD_LOG_LEVEL=info,DD_S3_BUCKET_NAME=datadog-forwarder-bucket}' --tags 'service=datadog-forwarder,version=3.39.0'
aws lambda add-permission --function-name datadog-forwarder --statement-id AllowInvokingFunctionFromCloudWatchLogs --principal logs.eu-west-3.amazonaws.com --action lambda:InvokeFunction --source-arn 'arn:aws:logs:eu-west-3:123456789012:log-group:*'
In AWS Console, the resource policy can be created in Lambda > Functions > datadog-forwarder > Configuration > Permissions > Resource-based policy > Add permissions

Configure Triggers

AWS integration page — https://app.datadoghq.com/account/settings#integrations/amazon-web-services

--

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Kubicast #42

Real-World Programming Lifesavers That Aren’t Really Taught In Books And School

Reference Cloud Architecture for Enterprise back end

Cloud Architecture diagram for small and medium enterprise web apps

Phase 3 Project: Rails

Google Cloud Platform Technology Nuggets — Mar 1–15, 2022 Edition

Dev Update #119-#120

DAO1 Listing on BarterTrade, Zero-Fee Trading Event for DAO1 Holders

I Wanna Go Fast - Load Balancing Dynamic Steering

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ayaz Badouraly

Ayaz Badouraly

More from Medium

Debugging AWS Lambda Logs 101

Lambda Monitoring and Debugging

Cross-stack AWS SQS Permissions

AWS AppSync GraphQL APIs to invoke Lambda function

Implement an Uptime Monitor Using AWS Lambda, EventBridge, SNS, and SQS.