dejonghe/aws-batch-example

Should there be two Fn:Select under Subnets?

Closed this issue · 1 comments

bwood commented

In my case I could not run the Cfn template until I made this change:

diff --git a/cloudformation/batch/batch-example.yml b/cloudformation/batch/batch-example.yml
index b9022db..d9bc1a2 100644
--- a/cloudformation/batch/batch-example.yml
+++ b/cloudformation/batch/batch-example.yml
@@ -193,7 +193,7 @@ Resources:
           - !Ref BatchSecGroup
         Subnets:
           - !Select [ '0', !Ref Subnets ]
-          - !Select [ '1', !Ref Subnets ]
+#          - !Select [ '1', !Ref Subnets ]
         Type: Ec2
         MinvCpus: 0
         ImageId: !Ref AMI

You likely only passed one subnet. I've changed this to just use the list rather than creating a list and selecting specific indexes.