At this point, we have completed the configuration of our CloudFormation template that will deploy the X-Ray daemon to AWS using the Fargate service with ECS service discovery enabled; you can deploy the changes to your stack by using the aws cloudformation deploy command, including the --capabilities parameter, given that our stack is now creating IAM resources:
> aws cloudformation deploy --template-file xray.yml --stack-name xray-daemon \
--capabilities CAPABILITY_NAMED_IAM
Waiting for changeset to be created..
Waiting for stack create/update to complete
Successfully created/updated stack - xray-daemon
Once the deployment has completed, if you open the ECS dashboard in the AWS console and select Clusters, you should see a new cluster called xray-daemon-cluster, with a single service and two running tasks, in the FARGATE section:
X...