Daemontasks (see this tracking issue).
"pidMode": "host"in the task definition (see documentation of
pidModehere). Host PID is required for gProfiler to be able to profile processes running in other containers (in case of Fargate, other containers under the same
entryPointparameters of your entry in the
containerDefinitionsarray. The new command should include the downloading of gProfiler and the execution of it in the background, and entryPoint will be
["python", "/path/to/my/app.py"], we will now change it to:
"are replaced with
["/bin/bash"]. If you had used
entryPointprior to incorporating gProfiler, make sure to use it in the new
--disable-pidns-checkis required because, well, we won't run in init PID NS :)
stderr. After verifying that everything works, you can append
> /dev/null 2>&1to the gProfiler command parenthesis (in this example, before the
& python...) to prevent it from spamming your container logs.
wgetinstalled. You can make sure
wgetis installed, or substitute the wget command with:
linuxParametersto the container definition (this goes directly in your entry in
sys_ptraceis required by various profilers, and Fargate by default denies it for containers.
Dockerfileto avoid having to download it every time in run-time. Then you just need to invoke it upon container start-up.