Does AWS Sagemaker charges you per API request? - amazon-web-services

AWS pricing page describes how much it costs per hour to run AWS Sagemaker for online realtime inference.
https://aws.amazon.com/sagemaker/pricing/
But AWS usually also charges for API requests.
Do they charge extra per every API inference request to the Sagemaker model?

I am on the AWS SageMaker team. For "Real-Time Inference" you are only charged for:
usage of the instance types you choose (instance hours)
storage attached to those instance (GB storage hours)
data in and out of your Endpoint (Bytes in/out)
See "Pricing Example #6: Real-Time Inference" as well.

Related

Is there any api available for AWS Pricing Calculator

Is there any api available for https://calculator.aws/#/ ?
There is no API for the AWS Pricing Calculator.
There is an AWS Price List API that can provide pricing for individual resources, but you would then need to multiply the individual costs based upon intended usage (eg 12 hours # $0.10 per hour).

Is there an API for Amazon compute savings plan for amazon ec2?

Currently the ec2 instance savings plan rate can be retrieved through boto3's pricing client get_products(). However it does not seem to offer the compute savings plan rates.
Where in the API can I retrieve the compute savings plan rates?
Edit:
The describe_savings_plan_rates is not suitable as I want a non truncated value
There is indeed an API for savings plans, the functions are documented here.
And available in the Boto3 SDK here.
For the rates themselves you can use the describe_savings_plan_rates function.

Cloudwatch log store costing vs S3 costing

I have an ec2 instance which is running apache application.
I have to store my apache log somewhere. For this, I have used two approaches:
Cloudwatch Agent to push logs to cloudwatch
CronJob to push log file to s3
I have used both of the methods. Both methods suit fine for me. But, here I am little worried about the costing.
Which of these will have minimum cost?
S3 Pricing is basically is based upon three factors:
The amount of storage.
The amount of data transferred every month.
The number of requests made monthly.
The cost for data transfer between S3 and AWS resources within the same region is zero.
According to Cloudwatch pricing for logs :
All log types. There is no Data Transfer IN charge for any of CloudWatch.Data Transfer OUT from CloudWatch Logs is priced.
Pricing details for Cloudwatch logs:
Collect (Data Ingestion) :$0.50/GB
Store (Archival) :$0.03/GB
Analyze (Logs Insights queries) :$0.005/GB of data scanned
Refer CloudWatch pricing for more details.
Similarly, according to AWS, S3 pricing differs region wise.
e.g For N.Virginia :
S3 Standard Storage
First 50 TB / Month :$0.023 per GB
Next 450 TB / Month :$0.022 per GB
Over 500 TB / Month :$0.021 per GB
Refer S3 pricing for more details.
Hence, we can conclude that sending logs to S3 will be more cost effective than sending them to CloudWatch.
They both have similar storage costs, but CloudWatch Logs has an additional ingest charge.
Therefore, it would be lower cost to send straight to Amazon S3.
See: Amazon CloudWatch Pricing – Amazon Web Services (AWS)

Does AWS S3 charge requests for EC2 transfer?

I understood from the pricing sheet that data transfer is free between EC2 and S3 in the same region, but will I still be charged for GET, PUT etc. requests?
You are correct -- there is no Data Transfer charge for traffic between Amazon EC2 instances and Amazon S3 within the same region. (The same goes for other services, too.)
However, these charges still apply:
Storage pricing
Request pricing

Pricing for using SQS within EC2

If messages are both sent and received from different EC2 instances in the same region, there will be no cost right?
In other words, messages are only billed if it's coming from or going to non-EC2 instances/systems?
See the Amazon SQS Pricing page for details of SQS pricing.
It is charged as:
Price per 1 Million Requests after Free Tier (Monthly)
Plus data transfer
A request includes SendMessage, ReceiveMessage, DeleteMessage, etc.
The Data Transfer charge within a Region is free. For example, if requests come from an Amazon EC2 instance in the same region as the Amazon SQS queue, there is no charge. The Data Transfer charge only applies for data going out of the cloud, eg to the Internet or to another Region.
As per the page:
Data transferred between Amazon SQS and Amazon EC2 within a single region is free of charge (that is, $0.00 per GB). Data transferred between Amazon SQS and Amazon EC2 in different regions is charged at Internet Data Transfer rates on both sides of the transfer.