Go back to the ECS Console:
Next, select the latest task version, and choose Create new revision.
Scroll down to the Task Role section:
ECS
Continue scrolling down.
In the Log collection section, expand and select Export logs to S3 via AWS Firelens.
Next, configure the log driver:
bucket
variable, enter firelens-logs
or any other name you assigned to the S3 Bucket in the previous step.retry_limit
and set it to 2
.When selecting different log options, a new container will be created below. Some details:
amazon/aws-for-fluent-bit:stable
Leave the log driver configuration settings as default.
Finally, click Create to create the new revision.
Success!
Return to the frontend service to update to the latest version. Click Update service.
Select the latest revision.
Leave the rest unchanged, scroll down, and click Create to update the service.
After a short time, you should see that two new containers have been created—one for the frontend and one for the log router. Logs are now being sent to the log router.