--- title: ".NET APM with AWS ECS" slug: "net-apm-with-aws-ecs" description: "Install .NET APM Profiler on AWS ECS for optimal performance monitoring. Follow easy setup steps for real-time insights. Retrace integration guide." updated: 2020-12-03T22:20:33Z published: 2020-12-03T22:20:33Z canonical: "docs.stackify.com/net-apm-with-aws-ecs" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.stackify.com/llms.txt > Use this file to discover all available pages before exploring further. # .NET APM with AWS ECS This document details how to install the **.NET APM Profiler** in your **.NET** application running on **AWS Elastic Container Service (ECS)**. ## Prerequisite Follow the [Retrace AWS ECS](/docs/aws-elastic-container-service-ecs) Guide. ## .NET Core Application Setup #### Dockerfile Configuration Adjust your **Dockerfile** to include the .Net Core Profiler: ``` RUN mkdir -m 0755 -p /stackify-dotnet-apm && \ cd /stackify-dotnet-apm && \ wget http://download.stackify.com/stackify-dotnet-apm/stackify-dotnet-apm-install-linux-latest.tar.gz && \ tar -zxvf stackify-dotnet-apm-install-linux-latest.tar.gz && \ cd stackify-dotnet-apm-install-linux && \ ./install.sh --docker && \ cd .. && \ rm -rf stackify-dotnet-apm-install-linux && \ rm stackify-dotnet-apm-install-linux-latest.tar.gz ENV CORECLR_PROFILER={cf0d821e-299b-5307-a3d8-b283c03916da} ENV CORECLR_ENABLE_PROFILING=1 ENV CORECLR_PROFILER_PATH="/stackify-dotnet-apm/StackifyProfiler.so" ``` #### Configure Application Create a file named Stackify.json and copy it to your container in the same folder as your application. ``` { "AppName": "MyApp", "Environment": "Production" } ``` **Environment** is optional, **STACKIFY_ENV** value will be used if not present. #### Task Configuration Application containers are required to have the **stackify** volume mount configured in the [Retrace AWS ECS](/docs/aws-elastic-container-service-ecs) Guide. Add the **stackify** volume to the task definition: ``` { "volumes": [ { "name": "stackify", "host": { "sourcePath": "/var/stackify" } } ] } ``` Add **stackify** mount points to the container definition: ``` { "containerDefinitions": [ { "mountPoints": [ { "readOnly": false, "containerPath": "/usr/local/stackify", "sourceVolume": "stackify" } ] } ] } ``` ## Verify Start up your .NET Core application task and make requests. You can then verify results in the Retrace dashboard.