Before you can use the AWS CloudFormation template to automate an Athena integration, you must wait for the first Cost and Usage Report to be delivered to your Amazon S3 bucket.
To streamline and automate integration of your Cost and Usage Reports with Athena, AWS provides an AWS CloudFormation template with several key resources along with the reports you setup for Athena integration. The AWS CloudFormation template includes an AWS Glue crawler, an AWS Glue database, and an AWS Lambda event.
From the services list, choose S3
Navigate to the S3 bucket where the Cost & Usage Report was saved
Select the Object named after the prefix defined when your Cost & Usage Report was created (Step 11 in Prepare Cost & Usage Report)
Select the Object named after the Cost & Usage Report
Download the crawler-cfn.yml file
Navigate to the CloudFormation service
Ensure you are in the same Region as your Cost & Usage Report S3 bucket
Deploy the CloudFormation template by clicking Create stack - With new resources (standard)
Select Upload a template file
Click Choose file and locate your
Enter a Stack Name to identify this as part of your CUDOS Dashboard setup
Define Stack options including tags, permissions and rollback configurations.
Enable “I acknowledge that AWS CloudFormation might create IAM resources." and click Create Stack