{"taskRoleArn": "ARN of the task role above","executionRoleArn": "ARN of execution role above","requiresCompatibilities": ["FARGATE"],"containerDefinitions": [// Only needed for custom log routing.
{"name":"log_router","essential":true,"image":"amazon/aws-for-fluent-bit:stable","firelensConfiguration":{"type":"fluentbit"},"logConfiguration":{"logDriver":"awslogs","options":{"awslogs-group":"firelens-container","awslogs-region":"us-west-2","awslogs-create-group":"true","awslogs-stream-prefix":"firelens"}},"memoryReservation":50},{"name":"my_app","image":"acctnum.dkr.ecr.region.amazonaws.com/image:tag","portMappings":[],"essential":true,"logConfiguration":{"logDriver":"awsfirelens","options":{"Name":"s3",// Optional, to customize key format which can be useful for batch jobs
"s3_key_format":"/%Y/%m/%Y-%m-%d-my-app-$TAG-%S","region":"your-aws-region","bucket":"my-app-logs",// Rotate to a new log file when this size is reached.
// For persistent services this should be much smaller.
// For batch jobs I set it large since it's nice to have
// all the logs for a run in one file.
"total_file_size":"10G","upload_timeout":"1m","retry_limit":"2"},}}]}