| Day | Tasks | Start Date | Completion Date | Reference Materials |
|---|---|---|---|---|
| Mon | - Research the Cost Explorer API and design the Lambda function: + Discussed the daily work plan with the team before starting. + Studied the GetCostAndUsage API and its parameters: TimePeriod, Granularity, Metrics, and GroupBy.+ Determined that the system should retrieve the previous day’s cost data because Cost Explorer has a data latency of up to 24 hours. + Designed the data structure and S3 partitioning strategy. + Summarized and shared the day’s progress with the team. | 15/06/2026 | 15/06/2026 | - AWS Cost Explorer API (GetCostAndUsage): https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetCostAndUsage.html |
| Tue | - Develop the Lambda Collector (Python + boto3): + Discussed the daily work plan with the team before starting. + Implemented the function to call the Cost Explorer API and retrieve cost data by AWS service. + Implemented the function to store cost data as JSON files in S3 (partitioned by year/month/day). + Implemented the function to send events (total cost and S3 object key) to SQS. + Summarized and shared the day’s progress with the team. | 16/06/2026 | 16/06/2026 | - Boto3 Cost Explorer Client: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ce.html - AWS Lambda Developer Guide (Python): https://docs.aws.amazon.com/lambda/latest/dg/lambda-python.html |
| Wed | - Write Terraform configuration to deploy the Lambda function: + Discussed the daily work plan with the team before starting. + Wrote lambda_collector.tf to package the source code (archive_file), create the Lambda function, and configure a CloudWatch Log Group with a retention policy.+ Passed configuration values through environment variables ( BUCKET_NAME, QUEUE_URL) instead of hard-coding them.+ Summarized and shared the day’s progress with the team. | 17/06/2026 | 17/06/2026 | - Terraform aws_lambda_function:https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function - Terraform archive_file:https://registry.terraform.io/providers/hashicorp/archive/latest/docs/data-sources/file |
| Thu | - Connect EventBridge and update IAM permissions: + Discussed the daily work plan with the team before starting. + Updated eventbridge.tf to connect the scheduled rule to the Lambda function (target + lambda_permission).+ Added the sqs:SendMessage permission to the Collector IAM Role while maintaining the Principle of Least Privilege.+ Ran terraform apply to deploy the Lambda function to AWS.+ Summarized and shared the day’s progress with the team. | 18/06/2026 | 18/06/2026 | - Terraform aws_cloudwatch_event_target:https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_target - EventBridge with Lambda: https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-use-resource-based.html |
| Fri | - Test and verify the data collection workflow: + Discussed the daily work plan with the team before starting. + Manually tested the Lambda Collector using an empty test event in the AWS Console. + Checked CloudWatch Logs to verify that the Lambda function executed successfully. + Confirmed that the cost data was written to S3 and that the event was successfully sent to SQS. + Summarized and shared the day’s progress with the team. | 19/06/2026 | 19/06/2026 | - Testing Lambda functions: https://docs.aws.amazon.com/lambda/latest/dg/testing-functions.html - Amazon CloudWatch Logs. |
year/month/day directory structure, making future querying and visualization in the dashboard more efficient and scalable.sqs:SendMessage permission to the IAM Role while adhering to the Principle of Least Privilege. All configuration values, including the S3 bucket name and SQS queue URL, are provided through environment variables instead of being hard-coded, following AWS security best practices.