How do I bill for using EC2 + AWS Elastic Inference taking Lambda?

0

We want to proceed with prediction through the Elastic Inference accelerator only when a request comes in to Lambda. If that's the case, will I still be charged when EC2 is up and running? Or are you charged only when you run predict?

1 Answer
1

When using EC2 instances with AWS Elastic Inference to serve predictions for a Lambda function, you will be charged for the usage of both the EC2 instance and the Elastic Inference accelerator.

The EC2 instance is billed based on its instance type, operating system, and the duration of its usage. You will be billed for the entire time that the instance is running, even if it is not actively processing requests from the Lambda function.

The Elastic Inference accelerator is billed based on the number of vCPUs and memory it provides, and the duration of its usage. You will be charged only for the duration that the accelerator is actively processing requests from the Lambda function.

To minimize costs, you can configure your Lambda function to only invoke the EC2 instance with the Elastic Inference accelerator when it receives a request, and terminate the instance when it has finished processing the request. You can also use AWS Auto Scaling to automatically scale the number of EC2 instances with Elastic Inference accelerators based on demand, and reduce costs by only running instances when they are needed.

Additionally, you can use AWS Cost Explorer and AWS Budgets to monitor your usage and costs, and set up alerts to notify you when you approach or exceed your budget.

AWS_Guy
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions