AWS Batch is a fully managed service for running jobs across multiple availability zones within a region. With AWS Batch you set up job queues, and then create job definitions that specify which shell scripts, Linux executables or Docker container images run your jobs. When a job on a queue is started, it runs in a compute environment: which can be Fargate, or on specified instance types. You can also specify the minimum, desired, and maximum number of vCPUs for the environment, along with the amount you are willing to pay for a Spot Instance as a percentage of the On-Demand Instance price, and AWS Batch will manage that environment
AWS Batch makes calls to other AWS services on your behalf to manage the resources that you use with the service. Before you can use the service, you must have an IAM policy and role that provides the necessary permissions to AWS Batch.
AWSBatchServiceRole policy sets up access to a few dozen EC2, autoscaling, ECS, logs and IAM actions. This role i set up automatically the first time you access the service.
There is no explicit charge for the AWS Batch service. You are charged on a pay as you go basis for the EC2, Lambda and Fargate instances the batch jobs use. You can use your Reserved Instances, Savings Plan, EC2 Spot Instances, and Fargate. Any discounts will be applied at billing time.