https://github.com/podaac/generate_error_handler
Generate error handler component that handles AWS Batch job failures
https://github.com/podaac/generate_error_handler
development generate
Last synced: 20 days ago
JSON representation
Generate error handler component that handles AWS Batch job failures
- Host: GitHub
- URL: https://github.com/podaac/generate_error_handler
- Owner: podaac
- License: apache-2.0
- Created: 2023-01-09T15:47:19.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-04-12T21:10:40.000Z (2 months ago)
- Last Synced: 2026-04-12T22:25:47.616Z (2 months ago)
- Topics: development, generate
- Language: Python
- Homepage:
- Size: 89.8 KB
- Stars: 1
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# error_handler
The error_handler program is an AWS Lambda function that processes AWS Batch job failures.
It logs the job failure to a CloudWatch log and publishes the job failure to an SNS Topic.
Top-level Generate repo: https://github.com/podaac/generate
## aws infrastructure
The error_handler program includes the following AWS services:
- Lambda function to execute code deployed via zip file.
- Permissions that allow EventBridge to invoke the Lambda function.
- IAM role and policy for Lambda function execution.
- EventBridge rule to catch Batch job failures and target Lambda function.
- SNS Topic for Batch job failure with a topic policy and an email subscription.
- SNS Topic for Lambda function failure with a topic policy and an email subscription.
- CloudWatch metric alarm for Lambda function errors.
## terraform
Deploys AWS infrastructure and stores state in an S3 backend using a DynamoDB table for locking.
To deploy:
1. Edit `terraform.tfvars` for environment to deploy to.
2. Edit `terraform_conf/backed-{prefix}.conf` for environment deploy.
3. Initialize terraform: `terraform init -backend-config=terraform_conf/backend-{prefix}.conf`
4. Plan terraform modifications: `terraform plan -out=tfplan`
5. Apply terraform modifications: `terraform apply tfplan`
`{prefix}` is the account or environment name.