Skill 6.3.3
Configuring service and application logging (for example, CloudTrail, Amazon CloudWatch Logs)
Key Concepts
Enable CloudTrail (organisation trail, plus data events where required), VPC Flow Logs (to CloudWatch Logs, S3 or Firehose), ALB, NLB and CloudFront access logs, S3 server access logs, Route 53 Resolver query logs, API Gateway execution and access logs, WAF logs and RDS/Aurora database logs. Each needs a destination with the right resource policy or delivery role.
Application logs go to CloudWatch Logs through the CloudWatch agent, the Lambda runtime, the awslogs or FireLens (Fluent Bit) log drivers for ECS, and Fluent Bit DaemonSets for EKS. Structured JSON logs make filtering and metric extraction much easier.