Capítulo 461 de 988

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

  1. Understand example when working with estimatePrice().
  2. Understand arguments when working with estimatePrice().
  3. Understand region when working with estimatePrice().
  4. Understand memorysizeinmb when working with estimatePrice().
  5. 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.