scheduled-ecs-task
scheduled-ecs-task copied to clipboard
Run recurring long running task on AWS ECS
Running ECS task on a schedule
File description
infrastructure/ecs.tf- ECS cluster and task configurationinfrastrcuture/ecr.tf- image repository configuration
Shortcuts and scripts
-
Run docker locally:
$ ./run.sh -
Publish docker to your ECR repository:
$ echo "YOUR_ECR_REPOSITORY_URI" > repo $ ./push.sh -
Apply terraform changes to your environment:
$ cd infrastructure/ $ terraform apply
AWS Access Configuration
For terraform and docker push scripts to find your AWS configuration, place the configuration in the ~/.aws/scheduled-ecs-credentials file:
[default]
aws_access_key_id=YOUR_ACCESS_KEY
aws_secret_access_key=YOUR_SECRET_ACCESS_KEY
region=us-west-2