- 最新
- 最多得票
- 最多評論
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.
相關內容
- 已提問 8 個月前
- AWS 官方已更新 3 年前
- AWS 官方已更新 2 年前