Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
TaskDefinition:
Type: AWS::ECS::TaskDefinition
Properties:
Family: my-app
Cpu: 512
Memory: 1024
NetworkMode: awsvpc
RequiresCompatibilities:
- FARGATE
ExecutionRoleArn: <execution role>
TaskRoleArn: <task role>
ContainerDefinitions:
- Name: datadog-agent
Image: datadog/agent:latest
Environment:
- Name: DD_API_KEY
Value: <your Datadog Key here>
- Name: DD_APM_ENABLED
Value: true
- Name: ECS_FARGATE
Value: true
- Name: DD_RECEIVER_PORT
Value: 8126
- Name: my-app
Image: <your app image>
Environment:
- Name: DD_TRACE_AGENT_PORT
Value: 8126
- Name: DD_TRACE_AGENT_HOSTNAME
Value: localhost
- Name: DD_SERVICE_NAME
Value: my-app
- Name: DD_ENV
Value: production
PortMappings:
- ContainerPort: <your app port>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment