This sample project provides an easy way to run load test with a K6 container in an ECS Fargate Task. The metrics are collected by the CloudWatch Agent sidecar in the Fargate Task. This project also provides a CloudWatch Dashboard to view the load testing result in the CloudWatch.
- Python3
- CDK
$ pip install -r requirements.txt
To get start it is just need to simply deploy the stack with the command "cdk deploy".
cdk deploy
An ECS Cluster and a Task Definition will deploy by the CloudFormation Access the AWS Console find the ECS Cluster Run a new task using the ECS Task Definition.
This sample also include a CloudWatch Dashboard to simply monitoring the metrics for the load test.
Replace all the region code in the CloudWatch dashboard template "cloudwatch-metrics-dashboard/dashboard.json".
Create a new CloudWatch Dashboard in the AWS Console.
Then open the dashboard, select "Action -> View/edit source" paste the template.
After creating the dashboard, you can monitor the load tests with CloudWatch dashboard.
- https://k6.io/docs/results-visualization/amazon-cloudwatch/
- https://github.com/aws/amazon-cloudwatch-agent/blob/master/amazon-cloudwatch-container-insights/ecs-task-definition-templates/deployment-mode/sidecar/cwagent-emf/README.md
- https://github.com/grafana/k6-example-cloudwatch-dashboards
See CONTRIBUTING for more information.
This library is licensed under the MIT-0 License. See the LICENSE file.