AWS AWSCloudFormation documentation change
Summary
Added EKS compute environment example, fixed ServiceRole syntax in examples, and added section headers
Security assessment
Changes demonstrate EKS integration and correct YAML/JSON syntax but don't address security vulnerabilities. SecurityGroupIds/InstanceRole in examples are standard configurations, not new security features.
Diff
diff --git a/AWSCloudFormation/latest/TemplateReference/aws-resource-batch-computeenvironment.md b/AWSCloudFormation/latest/TemplateReference/aws-resource-batch-computeenvironment.md index d43bc2285..059190996 100644 --- a//AWSCloudFormation/latest/TemplateReference/aws-resource-batch-computeenvironment.md +++ b//AWSCloudFormation/latest/TemplateReference/aws-resource-batch-computeenvironment.md @@ -297,0 +298,9 @@ Returns the compute environment ARN, such as `arn:aws:batch:_us-east-1_ :_111122 +###### + + * Managed Compute Environment + + * EKS Compute Environment + + + + @@ -310 +319 @@ The following example creates a managed compute environment called `C4OnDemand` - "arn:aws:iam::_111122223333_ :role/aws-service-role/batch.amazonaws.com/AWSServiceRoleForBatch", + "ServiceRole": "arn:aws:iam::_111122223333_ :role/aws-service-role/batch.amazonaws.com/AWSServiceRoleForBatch", @@ -351,2 +360 @@ The following example creates a managed compute environment called `C4OnDemand` - ServiceRole: - - arn:aws:iam::_111122223333_ :role/aws-service-role/batch.amazonaws.com/AWSServiceRoleForBatch + ServiceRole: arn:aws:iam::_111122223333_ :role/aws-service-role/batch.amazonaws.com/AWSServiceRoleForBatch @@ -378,0 +387,75 @@ The following example creates a managed compute environment called `C4OnDemand` +### EKS Compute Environment + +The following example creates a managed compute environment that uses Amazon EKS for container orchestration. + +#### JSON + + + { + "BatchComputeEnvironment": { + "Type": "AWS::Batch::ComputeEnvironment", + "Properties": { + "Type": "MANAGED", + "ComputeEnvironmentName": "MyEksCE", + "EksConfiguration": { + "EksClusterArn": "arn:aws:eks:_us-east-1_ :_111122223333_ :cluster/_my-cluster_ ", + "KubernetesNamespace": "my-batch-namespace" + }, + "ComputeResources": { + "AllocationStrategy": "BEST_FIT_PROGRESSIVE", + "MaxvCpus": 128, + "MinvCpus": 0, + "InstanceTypes": [ + "m5" + ], + "Type": "EC2", + "Subnets": [ + "subnet-aaaaaaaa", + "subnet-bbbbbbbb" + ], + "SecurityGroupIds": [ + "sg-abcd1234" + ], + "InstanceRole": "arn:aws:iam::_111122223333_ :instance-profile/_MyInstanceRole_ ", + "Ec2Configuration": [ + { + "ImageType": "EKS_AL2023", + "ImageKubernetesVersion": "1.31" + } + ] + }, + "State": "ENABLED" + } + } + } + +#### YAML + + + BatchComputeEnvironment: + Type: 'AWS::Batch::ComputeEnvironment' + Properties: + Type: MANAGED + ComputeEnvironmentName: MyEksCE + EksConfiguration: + EksClusterArn: arn:aws:eks:_us-east-1_ :_111122223333_ :cluster/_my-cluster_ + KubernetesNamespace: my-batch-namespace + ComputeResources: + AllocationStrategy: BEST_FIT_PROGRESSIVE + MaxvCpus: 128 + MinvCpus: 0 + InstanceTypes: + - m5 + Type: EC2 + Subnets: + - subnet-aaaaaaaa + - subnet-bbbbbbbb + SecurityGroupIds: + - sg-abcd1234 + InstanceRole: arn:aws:iam::_111122223333_ :instance-profile/_MyInstanceRole_ + Ec2Configuration: + - ImageType: EKS_AL2023 + ImageKubernetesVersion: '1.31' + State: ENABLED + +