dynamodb-toolbox
aws-lambda-power-tuning
Our great sponsors
dynamodb-toolbox | aws-lambda-power-tuning | |
---|---|---|
16 | 36 | |
1,725 | 5,120 | |
- | - | |
6.4 | 8.7 | |
12 days ago | 6 days ago | |
TypeScript | JavaScript | |
MIT License | 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.
dynamodb-toolbox
-
[UPDATED] The DynamoDB-Toolbox v1 beta is here 🙌 All you need to know!
One of them was that it had originally been coded in JavaScript. Although Jeremy rewrote the source code in TypeScript in 2020, it didn't handle type inference, a feature that I eventually came to implement myself in the v0.4.
-
The DynamoDB-Toolbox v1 beta is here 🙌 All you need to know!
If you have in mind features that I missed, or would like to see some of the ones I mentioned prioritised, please comment this article and/or create an issue or open a discussion on the official repo with the v1 label 👍
-
An in-depth comparison of the most popular DynamoDB wrappers
For instance, here is an example of the same UpdateCommand with one of those wrappers, DynamoDB-Toolbox:
-
Beginners Guide to DynamoDB with Node.js
Note that all these entities will belong to the same DynamoDB table. We define only one partition key and one sort key for this table: both of type string. Key is the values we provide for these keys. As you can imagine, this quickly can become a bit tangled mess. Therefore I recommend to express this 'schema' (e.g. of what types of keys we lay over our base table) in code. Later in this article I will show how this can be accomplished using the DynamoDB Toolbox framework.
-
Dynamodb design with Appsync
I use single table design with app sync through this library: https://github.com/jeremydaly/dynamodb-toolbox
-
Unleashing the power of serverless for solo developers
Serverless Cloud further reduces the cognitive load on developers by automatically applying best practices for APIs, data, storage, CDNs, and more. For example, Jeremy Daly, GM of Serverless Cloud, created the DynamoDB Toolbox to help developers implement the best practices of single table design for Amazon DynamoDB. Serverless Data bakes in those best practices for you and provides a simple interface to manage your data. Similarly, your API endpoint will automatically have a sufficient amount of computational resources by simply using the api interface of our SDK. Serverless Cloud continuously adapts the best configuration for your application, letting you focus on solving business problems, not infrastructure ones.
-
TypeSafe type definitions for the AWS DynamoDB API
I like the idea, especially since I found libraries like https://github.com/jeremydaly/dynamodb-toolbox or https://github.com/sensedeep/dynamodb-onetable not elastic or up to date enough for me and reverted to raw AWS SDK. I look forward to AWS SDK v3 support in your typings!
-
Building successful transactional applications on DynamoDB
As a result, I developed dynaglue for this purpose, and highly recommend the use of something like it when developing with DynamoDB (alternatives I've seen include DynamoDB Toolbox, TypeORM and DynamoDB OneTable).
-
12 Common Misconceptions about AWS DynamoDB
Moreover, the ecosystem of DynamoDB is constantly growing. There are more and more tools providing useful abstractions like DynamoDB Toolbox by Jeremy Daly for working with single-table design, Dynamoose for ORM-like experience, AWS Amplify which hides the DynamoDB layer from the programmer completely, or Dynobase which helps you in navigating between profiles, regions, tables and exploring datasets.
- 6 importantes bibliotecas para AWS Serverless TypeScript
aws-lambda-power-tuning
-
AWS SnapStart - Part 13 Measuring warm starts with Java 21 using different Lambda memory settings
In case of not enabling SnapStart for the Lambda function we observed that increasing memory reduces the warm execution time for our use case especially for p>90. As adding more memory to the Lambda function is also a cost factor, the sweet spot between cold and warm start time and cost is somewhere between 768 and 1204 MB memory setting for the Lambda function for our use case. You can use AWS Lambda Power Tuning for very nice visualisations.
-
How to optimize your lambda functions with AWS Lambda power tuning
This tool, which is open source and available here, takes the form of a Step Function that is deployed on your AWS account. The purpose of this Step Function is to run your lambda with different memory configurations several times and output a comparison in the form of a graph (or JSON) to try to find the optimal balance between cost and execution time. There are three possible optimization modes: cost, execution time, or a "balanced" mode where it tries to find a balance between the two.
-
Developers Journey to AWS Lambda
The AWS Documentation's Memory and Computing Power page is a good starting point. To avoid configuring it manually, it's worth checking out AWS Lambda Power Tuning, which will help you find the sweet spot.
-
Guide to Serverless & Lambda Testing — Part 2 — Testing Pyramid
Utilizing tools such as AWS X-Ray, AWS Lambda Power Tuning, and AWS Lambda Powertools tracer utility is recommended. Read more about it here.
-
Tunea tus funciones Lambda
Install the AWS SAM CLI in your local environment. Configure your AWS credentials (requires AWS CLI installed): $ aws configure Clone this git repository: $ git clone https://github.com/alexcasalboni/aws-lambda-power-tuning.git Build the Lambda layer and any other dependencies (Docker is required): $ cd ./aws-lambda-power-tuning $ sam build -u sam build -u will run SAM build using a Docker container image that provides an environment similar to that which your function would run in. SAM build in-turn looks at your AWS SAM template file for information about Lambda functions and layers in this project. Once the build has completed you should see output that states Build Succeeded. If not there will be error messages providing guidance on what went wrong. Deploy the application using the SAM deploy "guided" mode: $ sam deploy -g
-
AWS Serverless Production Readiness Checklist
Use AWS Lambda Power Tuning to balance cost and performance.
-
GPT-Powered chatbot over the phone - Try it, and see how it was built
Since it relies on an external API call, it does take a while to execute (1.285 seconds on average), which is very inefficient, and despite throwing Lambda Power Tuning at the problem, it's purely an external dependency issue, and can't be resolved by resources. You could make it more cost-effective using AWS Step Functions to handle the OpenAI API call asyncrhonously, but I didn't worry for this project.
-
Tips to avoid surprises in your AWS bill
Optimise the memory settings for functions that use provisioned concurrency and adjust memory allocation for a function by using a tool like this to avoid guesswork.
-
Modern hardware is fast, so let's choose the slowest language to balance it out
Adding to this, increasing lambda size can actually reduce your spend on lambda depending on what you're actually running. And there's a tool to figure out what's optimal. https://github.com/alexcasalboni/aws-lambda-power-tuning
-
Optimize your workloads for Sustainability
Use tools like AWS lambda power tuning, and AWS Compute Optimizer to right-size your resources. In addition, you should use Auto Scaling to automatically scale up and down based on demand. To improve the overall resource efficiency and reduce idle capacity in the entire Cloud AWS, use Amazon EC2 Spot Instances. Spot Instances are unused EC2 capacity in AWS, this instance also gives you up to a 90% discount compared to On-Demand prices. If you are using EKS you should follow the EKS Best Practices Guides - especially the Auto Scaling guide to improve the utilization of your nodes. Moreover, you should generally adopt a serverless, event-driven architecture to maximize overall resource utilization.
What are some alternatives?
typedorm - Strongly typed ORM for DynamoDB - Built with the single-table-design pattern in mind.
dynamoose - Dynamoose is a modeling tool for Amazon's DynamoDB
dynamodb-onetable - DynamoDB access and management for one table designs with NodeJS
middy - 🛵 The stylish Node.js middleware engine for AWS Lambda 🛵
json-schema-to-ts - Infer TS types from JSON schemas 📝
nanoid - A tiny (124 bytes), secure, URL-friendly, unique string ID generator for JavaScript
aws-sam-cli - CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
aws-graviton-getting-started - Helping developers to use AWS Graviton2 and Graviton3 processors which power the 6th and 7th generation of Amazon EC2 instances (C6g[d], M6g[d], R6g[d], T4g, X2gd, C6gn, I4g, Im4gn, Is4gen, G5g, C7g[d][n], M7g[d], R7g[d]).
typebridge - Typescript toolbox for AWS EventBridge
dynaglue - Make DynamoDB single-table designs easier to query and update