Chapter 461: estimatePrice()
Core Idea
Calculates the AWS costs incurred for AWS Lambda given the region, execution duration and memory size based on the AWS Lambda pricing matrix.
Key Concepts
- Example
- Arguments
- region
- memorySizeInMb
- durationInMilliseconds
- lambdasInvoked
- diskSizeInMb
- Return value
Code Examples
console.log(
estimatePrice({
region: "us-east-1",
durationInMilliseconds: 20000,
memorySizeInMb: 2048,
diskSizeInMb: 2048,
lambdasInvoked: 1,
})
); // 0.00067
- What it demonstrates: Usage pattern for estimatePrice() from the official docs.
Key Takeaways
- Understand example when working with estimatePrice().
- Understand arguments when working with estimatePrice().
- Understand region when working with estimatePrice().
- Understand memorysizeinmb when working with estimatePrice().
- Understand durationinmilliseconds when working with estimatePrice().
Connects To
- api: related page in the Lambda (@remotion/lambda) section.
- Approuterwebhook: related page in the Lambda (@remotion/lambda) section.
- Authentication: related page in the Lambda (@remotion/lambda) section.