AWS FireLens enables Amazon ECS to route container logs directly to storage systems and analytics tools without modifying application code. By enabling FireLens, Amazon ECS injects an AWS for Fluent Bit sidecar container into your task definition. Application container standard output (stdout) and standard error (stderr) streams are automatically routed to the Fluent Bit sidecar container via a local socket using the Fluentd forward protocol. Fluent Bit then buffers the log events, compresses them, and writes them to your Amazon S3 bucket.
Open the Amazon Elastic Container Service console.
In the left navigation menu, click Task definitions.
In the task definitions list, click FCAJResbar-task-fe.

Click the Create new revision split button and select Create new revision

On the Create revision page, locate the Task roles - conditional section:
ECSTaskFullAccessToS3Role (the role created in module 7.2).ecsTaskExecutionRole.
Setting the Task role grants the running Fluent Bit sidecar container temporary AWS STS credentials required to upload log objects directly into your Amazon S3 bucket via the AWS SDK.
Scroll down to the Container - 1 section (representing the application container named frontend).
Expand the Log collection panel:

bucket: in the Value field, enter firelens-logs-7180retry_limit2

Scroll down to the second container automatically injected by the console:
log_routerpublic.ecr.aws/aws-observability/aws-for-fluent-bit:stableUnder Resource allocation limits - conditional
1 (1 vCPU).3 (3 GB).2 (2 GB).
In the lower-right corner, click the orange Create button.


Click the Deploy dropdown button and select Update service.

On the Update service page, locate the Deployment configuration section:

Click the orange Update button.

In the Amazon ECS console, navigate to Clusters > FCAJ-Lab-cluster > Services > app-frontend > Deployments.
Monitor the Latest service deployment timeline:
