IN THIS ARTICLE
Using the Deployed Resources
Once the AWS Metrics resources have been deployed, you can use features such as real-time analytics and batch analytics.
After deploying the AWS Cloud Development Kit (AWS CDK) application, an Amazon CloudWatch dashboard is created automatically to show the operational health metrics and sample metrics (TotalLogin) defined in the AWS CDK application.
To start the real-time analytics, go to the Amazon Kinesis console or use the AWS CLI
start-application command to start the Kinesis Data Analytics application.
Important:Please be aware that you are charged an hourly rate to run the application.
The CloudWatch dashboard will start showing the metrics you sent from the client side while the application is running.
Most of the components deployed for real-time analytics are extensible. You can customize the Kinesis Data Analytics application, analytics-processing Lambda, and CloudWatch dashboard from the AWS CDK application code or the AWS console to transform and analyze your streaming data.
Note that re-deploying the AWS CDK application will overwrite any changes you made through the AWS Console. Therefore it is suggested that you make the modification through the AWS CDK application code and redeploy the AWS CDK application.
To enable the optional batch analytics feature, specify
batch_processing=true when you synth and deploy the AWS CDK application.
cdk synth -c batch_processing=true cdk deploy -c batch_processing=true
Metrics data will be sent to the Amazon S3 Data Lake and saved in the parquet format. To make the data discoverable, go to the AWS Glue console or use the AWS CLI
start-crawler command to start the Glue crawler deployed by the AWS CDK application. After the crawler finishes its work, the metrics event table will be updated. Then you can run queries on the data through Amazon Athena engine.
There are a few named queries created within your AWS CDK application under a specific work group for your project. You can run these sample queries as an example or create custom queries for batch analytics.
You can also create an Amazon QuickSight dashboard (not included in the AWS CDK application) to visualize the statistics. For instructions, see Build the Amazon QuickSight Dashboard in the Game Analytics Pipeline documentation.
Similar to the real-time analytics, you can also customize the components for batch processing. For example, you can define custom transformation in the events processing Lambda or change the behavior of the Glue crawler to run it periodically.
The AWS CloudFormation stack deployed by the AWS CDK application contains the following outputs. You can use these outputs for reference and create the resource mapping file based on them.
|AdminPolicyOutput||Admin policy ARN to call service.|
|AnalyticsApplicationName||Kinesis Data Analytics application to process the real-time metrics data.|
|DashboardName||CloudWatch dashboard to monitor the operational health and real-time metrics.|
|DeploymentStage||Stage for the REST API deployment.|
|EventsCrawlerName||Glue Crawler to populate the AWS Glue Data Catalog with metrics events tables.|
|RestApiId||Service API Id for the analytics pipeline.|
|UserPolicyOutput||User policy ARN to call service.|