Attempting to run the template produces an error on a brand new AWS account. The error is
following the advice there and adding an :InstanceProfile that referenced that role seems to have worked
Type: AWS::IAM::InstanceProfile
Properties:
Path: '/'
Roles:
- !Ref BatchExecutionRole
ComputeEnvironment:
Type: AWS::Batch::ComputeEnvironment
Properties:
Type: MANAGED
ServiceRole: !GetAtt 'BatchExecutionRole.Arn'
ComputeEnvironmentName: !Join [ "-", [ 'batch-compute-env', !Ref 'AWS::StackName' ] ]
ComputeResources:
MaxvCpus: !Ref MaxVCPUBatch
SecurityGroupIds:
- !Ref SagemakerSecurityGroup
Type: EC2
Subnets:
- !Ref Subnet1
- !Ref Subnet2
MinvCpus: !Ref MinVCPUBatch
InstanceRole: !GetAtt BatchInstanceProfile.Arn
InstanceTypes:
- c4.large
- c4.xlarge
- c4.2xlarge
- c4.4xlarge
- c4.8xlarge
DesiredvCpus: !Ref DesiredVCPUBatch
State: ENABLED
However, given my relative inexperience with cloudformation I figured I would bring this up as an issue instead of a pr