Before proceeding to next step make sure the AWS account used for this workshop has ECS anywhere enabled. If not reach out to your AWS TAM (Technical account manager) who can help you with this
Run the following command to create a ECS cluster
# Create ECS Cluster
aws ecs create-cluster --cluster-name $CLUSTER_NAME
Below command will create an ECS-anywhere activation key and write it to ssm-activation.json in your current working directory
# Create activation Key
aws ssm create-activation --iam-role $ROLE_NAME | tee ssm-activation.json
Run the following command to verify the generated activatio
cat ssm-activation.json
{
"ActivationId": "<<ACTIVATIONID>>",
"ActivationCode": "<<ACTIVATIONCODE>>"
}
Note: This activation key will help to associate the virtual machine to ECS control plane