Bridgecrew solution to create vulnerable infrastructure.
To prevent vulnrable infrastructure from arriving to production see: https://github.com/bridgecrewio/checkov/
aws cloudformation create-stack --stack-name cfngoat --template-body file://cfngoat.yaml --region us-east-1 --parameters ParameterKey=Password,ParameterValue=MyPassword10 --capabilities CAPABILITY_NAMED_IAM
Expect provisioning to take at least 5 minutes.
If you want to provision another stack with a different environment:
aws cloudformation create-stack --stack-name cfngoat2 --template-body file://cfngoat.yaml --region us-east-1 --parameters ParameterKey=Password,ParameterValue=MyPassword10 ParameterKey=Environment,ParameterValue=dev2 --capabilities CAPABILITY_NAMED_IAM