AWS Cost and Usage Reports function tracks your AWS usage and provides estimated charges associated with your account. This integration allows you to ship logs from your AWS Cost and Usage Reports to your Logz.io account.
Your Lambda function needs to run within the AWS Lambda limits, such as memory allocation and timeout. Make sure you understand these limits. If you can’t adjust your settings to stay within the Lambda limits, you can use the AWS Support Center console to request an increase. Learn more about AWS Lambda Limits.
This deployment will automatically create the following resources:
Login to your account
To begin, you need to login to your AWS account.
Create a new stack
Select the button below to create a new stack dedicated to sending the AWS cost and usage reports to Logz.io.
Keep the default setting in the Create stack screen and select Next.
Specify the stack details
Specify the stack details as per the table below and select Next.
|LogzioToken||Your Logz.io log shipping token:
|LogzioURL||The Logz.io listener URL:
|ReportAdditionalSchemaElements||Choose INCLUDE if you want AWS to include additional details about individual resources IDs in the report (This might significantly increase the report size and might affect performance. AWS Lambda can run for up to 15 minutes with up to 10240 MB, and the process time for the whole file must end within this timeframe.) This is an optional parameter.|
|ReportName||The name of report that you want to create.|
|ReportPrefix||The prefix that AWS adds to the report name when AWS delivers the report.|
|ReportTimeUnit||The granularity of the line items in the report. Can be Hourly, Daily or Monthly. (Enabling hourly reports does not mean that a new report is generated every hour. It means that data in the report is aggregated with a granularity of one hour.)|
|S3BucketName||The name for the bucket which will contain the report files.|
Configure the stack options
Specify the Key and Value parameters for the Tags and select Next.
Review the deployment
Confirm that you acknowledge that AWS CloudFormation might create IAM resources and select Create stack.
Check Logz.io for your logs
Give your logs some time to get from your system to ours, and then open Kibana.
All logs that were sent from the Lambda function will be under the type billing.
To get more out of this functionality, you can enable a dedicated AWS cost and usage dashboard in ELK Apps.
If you still don’t see your logs, see log shipping troubleshooting.