Application Sub Type: Job
An application always has a type of app
, and a sub_type. These docs are for the job
sub_type.
Contents
Config file structure
A job
application is one that does not need to have DNS and be accessible by other applications or end users. It can be many things, but is often
The following fields are available for a job
application:
name | type | default | required |
---|---|---|---|
type | string | always app | true |
sub_type | string | always job | true |
name | string | same as resource_label | true |
health_check_path | string | / | false |
schedule | string; cron format | “0 0 * * *” | false |
command | list/slice of strings | none | false |
cpu | int/number | 256 (0.25 vCPU) | false |
memory | int/number | 1 GB | false |
iam_permissions | list/slice | none | false |
environments | list/slice | none | true |
iam_permissions
A list of objects, where each object has the following available fields.
Field name | Field type | Default value | Required |
---|---|---|---|
Effect | string; one of Allow or Deny | none | true |
Action | list/slice; the AWS actions your app needs permission to perform (ie, s3:GetObject) | none | true |
Resource | list/slice; the AWS resources your application needs access to | none | true |
environments
A list of objects, where each object has the following available fields
Field name | Field type | Default value | Required |
---|---|---|---|
environment | string; the resource_label for the environment | none | true |
group | string; the resource_label for the group the environment belongs to | none | true |
command | list/slice of strings | none | false |
cpu | int/number | none (same as defined in root) | false |
memory | int/number | none (same as defined in root) | false |
schedule | string | none (same as defined in root) | false |
Full Example
Here is a full example of a job
application config file.
my_app:
name: my-app
type: app
sub_type: job
health_check_path: /
iam_permissions:
- Effect: Allow
Action:
- s3:GetObject
Resource:
- arn:aws:s3:::my_bucket/*
environments:
- environment: dev_environment
group: preprod_group
schedule: "0 1 * * *"
- environment: stage_environment
group: preprod_group
cpu: 512
memory: 2048
command:
- "python3"
- "./test.py"
iam_permissions:
- Effect: Allow
Action:
- s3:GetObject
Resource:
- arn:aws:s3:::my_stage_bucket/*
cpu: 256
memory: 1024