Sample code for retrieving the AWS AMI IDs for ARM64 images.
aws ssm get-parameters --names /aws/service/ecs/optimized-ami/amazon-linux-2/arm64/recommended