Tutorial: Create a managed compute environment using Fargate resources
Complete the following steps to create a mangaed compute environment using AWS Fargate resources.
-
Open the AWS Batch console at https://console.aws.amazon.com/batch/
. -
From the navigation bar, select the AWS Region to use.
-
In the navigation pane, choose Compute environments.
-
Choose Create.
-
Configure the compute environment.
Note
Compute environments for Windows containers on AWS Fargate jobs must at least one vCPU.
-
For Compute environment configuration, choose Fargate.
-
For Name, specify a unique name for your compute environment. The name can contain up to 128 characters in length. It can contain uppercase and lowercase letters, numbers, hyphens (-), and underscores (_).
-
For Service role, choose service-linked role that lets the AWS Batch service to make calls to the required AWS API operations on your behalf. For example, choose AWSServiceRoleForBatch. For more information, see Service-linked role permissions for AWS Batch.
-
(Optional) Expand Tags. To add a tag, choose Add tag. Then, enter a Key name and optional Value. Choose Add tag.
-
Choose Next page.
-
-
In the Instance configuration section:
-
(Optional) For Use Fargate Spot capacity, turn on Fargate Spot. For information about Fargate Spot, see Using Amazon EC2 Spot and Fargate_SPOT.
-
For Maximum vCPUs, choose the maximum number of vCPUs that your compute environment can scale out to, regardless of job queue demand.
-
Choose Next page.
-
-
Configure networking.
Important
Compute resources need access to communicate with the Amazon ECS service endpoint. This can be through an interface VPC endpoint or through your compute resources having public IP addresses.
For more information about interface VPC endpoints, see Amazon ECS Interface VPC Endpoints (AWS PrivateLink) in the Amazon Elastic Container Service Developer Guide.
If you do not have an interface VPC endpoint configured and your compute resources do not have public IP addresses, then they must use network address translation (NAT) to provide this access. For more information, see NAT gateways in the Amazon VPC User Guide. For more information, see Tutorial: Create a VPC.
-
For Virtual Private Cloud (VPC) ID, choose a VPC where you want to launch your instances.
-
For Subnets, choose the subnets to use. By default, all subnets within the selected VPC are available.
Note
AWS Batch on Fargate doesn't currently support Local Zones. For more information, see Amazon ECS clusters in Local Zones, Wavelength Zones, and AWS Outposts in the Amazon Elastic Container Service Developer Guide.
-
For Security groups, choose a security group to attach to your instances. By default, the default security group for your VPC is chosen.
-
Choose Next page.
-
-
For Review, review the configuration steps. If you need to make changes, choose Edit. When you're finished, choose Create compute environment.