Amazon API Gateway to AWS Batch

API Gateway → AWS Batch

API Gateway REST API endpoint to AWS Batch

This template creates an API Gateway REST API integration with AWS Batch and can submit jobs to AWS Batch. This pattern addresses some nuances with defining the VTL template mapping when integrating with AWS Batch. It also creates an IAM execution role with permissions to submit AWS Batch job.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/apigw-rest-api-batch-sam

Deploy

sam deploy --guided


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

1. Delete the stack: sam delete --stack-name STACK_NAME.
2. Confirm the stack has been deleted: aws cloudformation list-stacks --query "StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus"

Created by:

Pawan Puthran

Pawan Puthran

Principal Serverless Specialist at AWS.