Three separate things, and most accounts want two of them:

ECS and Fargate — collector sidecar

On Fargate you cannot run a node agent, so the collector goes in the task as a second container. Your app talks to it over localhost and only the collector holds the key.
In the task definition, run the collector alongside your app:
Two things worth copying: essential: false so a collector crash does not kill the task, and the key delivered through secrets from Secrets Manager rather than a plain environment variable readable by anyone with ecs:DescribeTaskDefinition.
Your app container then needs only:

Lambda — the ADOT layer

Layer ARNs are region- and runtime-specific and AWS revises them — get the current one from the ADOT Lambda docs rather than copying an ARN.
AWS_LAMBDA_EXEC_WRAPPER=/opt/otel-handler is what activates the layer. Attaching the layer without it is the most common reason a Lambda reports nothing.
Lambda freezes the environment when the handler returns, which can strand buffered spans until the next invocation. For low-traffic functions, export synchronously:

EC2 — collector as a systemd service

Use the same config as the sidecar above, swapping the ecs detector for ec2 and adding the hostmetrics receiver for CPU, memory, disk and network.

Managed services

Instrumentation only covers services you deploy. For RDS, ELB, SQS and Lambda platform metrics, use the CloudFormation stack on the Infrastructure → AWS page of your dashboard, which sets up a CloudWatch metric stream into the same ingress.
Metric streams do not cross regions — an account spanning us-east-1 and us-east-2 needs the stack deployed in both.