cdk-async-testing-example
aws-embedded-metrics-node
cdk-async-testing-example | aws-embedded-metrics-node | |
---|---|---|
3 | 7 | |
4 | 242 | |
- | 0.4% | |
0.0 | 5.0 | |
almost 2 years ago | about 1 month ago | |
TypeScript | TypeScript | |
- | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cdk-async-testing-example
-
First Look at Lambda Powertools TypeScript
If you want to see my instrumented code, it is available in this branch.
-
Cloud Driven Development - Episode #001
Example
-
Testing the Async Cloud with AWS CDK
Read enough already? Check out my source code.
aws-embedded-metrics-node
-
💔 Goodbye Cold Starts ❤️Hello Proactive Initialization
Lamby will now publish CloudWatch Embedded Metrics in the Lamby namespace with a custom dimension for each application's name. Captured metrics include counts for Cold Starts vs. Proactive Initializations. Here is an example running sum of 3 days of data for a large Rails application in the us-east-1 region.
-
Question: How to you handle errors in your lambda ?
I was looking into CloudWatch Embedded Metrics - which is a format that converts logs into cloudwatch metrics automatically.
-
Lambda Powertools TypeScript is Generally Available
Often when it comes to metrics, we think about CPU, latency and other operational metrics and AWS services usually provide those out of the box. This kind of thinking can be flawed when we end up having to use 3rd parties such as google analytics to infer critical business events. A simpler solution is to have the application emit a metric when a business event (say a customer signup) occurs. We have a few options for doing this: We can use aws-sdk, we can use the aws-embedded-metrics lib and now we can use Powertools Metrics. Which is the best? Let's see.
-
Observability Best Practices when running FastAPI in a Lambda
Let's explore the next core utility in Lambda Powertools, the Metrics utility. This utility lets you easily push metrics to CloudWatch by taking care of all the necessary boilerplate. It works asynchronously by using Amazon CloudWatch Embedded Metrics Format, by logging the metrics to stdout. It also aggregates all metrics from each invocation to save on the number of calls to CloudWatch.
-
How to report CloudWatch metrics without AWS SDK
To make it easier to create such an object, AWS has provided libraries for Node.js, Python, Java, and .NET. The above example using the AWS SDK can now be written as follows:
-
First Look at Lambda Powertools TypeScript
Custom metrics have a pricing structure which can be expensive. Embedded Metrics Format can help manage the cost and is supported by Lambda Powertools TypeScript. Again, the docs here are pretty good, so no need for me to break it down. Instead let's look at the experience. I've added a custom metric of "collectionSuccess" to my collectionSuccess function. In my hypothetical app, some payments wind up in collections and here I'm marking whether or not the collection resulted in a payment.
-
How To Debug AWS Lambda: A Detailed Overview
You can use metrics to aid debugging by adding them to your dashboards that we talked about earlier. It’s also possible to add custom metrics, and there are many libraries and tools (e.g. node, python, etc) which can help you do this.
What are some alternatives?
websocat - Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
supertest - 🕷 Super-agent driven library for testing node.js HTTP servers using a fluent API. Maintained for @forwardemail, @ladjs, @spamscanner, @breejs, @cabinjs, and @lassjs.
aws-testing-library - Chai (https://chaijs.com) and Jest (https://jestjs.io/) assertions for testing services built with aws
deno-lambda - A deno runtime for AWS Lambda. Deploy deno via docker, SAM, serverless, or bundle it yourself.
dazn-lambda-powertools - Powertools (logger, HTTP client, AWS clients, middlewares, patterns) for Lambda functions.
middy - 🛵 The stylish Node.js middleware engine for AWS Lambda 🛵
cdk-eventbridge-socket - CDK construct that creates a WebSocket endpoint for you for any EventBridge rule you are interested in. (Built for debugging + testing )
aws-embedded-metrics-dotnet - Amazon CloudWatch Embedded Metric Format Client Library
powertools-lambda-typescript - Powertools is a developer toolkit to implement Serverless best practices and increase developer velocity.
docker-lambda - Docker images and test runners that replicate the live AWS Lambda environment
powertools-lambda
aws-embedded-metrics-python - Amazon CloudWatch Embedded Metric Format Client Library