Try to do something on AWS Batch.
- Getting Start with AWS Batch
- Run a Python script on AWS Batch
- Send a slack notification from the AWS Batch Job
- Get exported logs from S3 in the AWS Batch Job
- Manage AWS Batch related resources with terraform
- Try AWS Batch Event Stream for CloudWatch Events
- Submit a job from AWS Lambda
- etc...
$ cd tf/
$ terraform init -backend=true \
-backend-config="bucket=[your_bucket_name]" \
-backend-config="key=ex-aws-batch/terraform.tfstate" \
-backend-config="region=[your_region_name]"
$ terraform plan
$ terraform apply
$ aws batch describe-compute-environments
$ aws batch describe-job-queues
$ aws batch describe-job-definitions
$ cat slack.json
{
"webhook_url": "[your_slack_incoming_webhook_url]"
}
$ aws s3 cp slack.json s3://ex-aws-batch/slack.json --sse
$ ./push_image_to_ecr.sh
$ ./test_on_local.sh "#test" "Test on local" "path/to/your/zip/file/on/s3"
Environment variables must not start with AWS_BATCH; this naming convention is reserved for variables that are set by the AWS Batch service. Ref. https://docs.aws.amazon.com/batch/latest/userguide/submit_job.html
$ ./submit_job.sh "#test" "Test on AWS Batch" "path/to/your/zip/file/on/s3" "Batch Job Name"