6

I am using for 4 dataset group for example:-

  1. Movies
  2. Mobile
  3. Laptops
  4. AC

And in each datasetGroup, we have 3 datasets with name Users, Item and Item_User_INTERACTIONS

And we also have one solution and Campaigns for each dataset group.

I am also sending the real-time event to AWS Personalize using API (putEvent)

The above things cost me about 100USD in two days and showing 498 TPS hours used and I am unable to find the real reason for this much cost.

Or does AWS Personalize simply cost this much?

legoscia
  • 39,593
  • 22
  • 116
  • 167
pawansgi92
  • 1,065
  • 13
  • 32

2 Answers2

7

As your billing tells you, you have used 498 TPS hours, let's calculate if it should be $100.

According to official Amazon Personalize pricing: https://aws.amazon.com/personalize/pricing/

For first 20K TPS-hour per month you have to pay $0.20 per TPS-hour.

You have used 498 TPS hours in two days, it gives us: $0.2 * 498 = $99.6 in total.

The answer is: yes, it's expensive.

Another question is: How TPS usage is calculated?

They charge you for each TPS that is currently reserved. So if you have a campaign with 1 TPS and it's created for 24 hours, then you will be charged for 24[h] x 1[TPS] = 24 TPS hours = $4.8.

The problem is, that $0.2 doesn't look expensive, but if you multiply it by hours, it becomes very expensive.

For testing purposes you should always set TPS to 1, since you cannot set it to 0. 1 TPS allows you to get 3600 recommendations per hour, which is a lot anyways.

PatrykMilewski
  • 922
  • 8
  • 17
  • 1
    Very helpful answer, I want to add on to the last point on setting TPS. You **cannot** set a max TPS according to https://docs.aws.amazon.com/personalize/latest/dg/frequently-asked-questions.html `You can only set the minimum throughput for a campaign. If your TPS increases beyond minProvisionedTPS, Amazon Personalize auto-scales the provisioned capacity up and down, but never below the minProvisionedTPS`. What this means is that, in reality, your costs might increase dramatically since you cannot control the max TPS which your users might send to your service – user5305519 Jul 18 '22 at 05:40
  • What AWS recommends is to create [a monitoring dashboard to track your TPS](https://github.com/aws-samples/amazon-personalize-monitor) which can even help you to scale down your min provisioned TPS. However, the limitation is that, again, min TPS needs to be >=1 – user5305519 Jul 18 '22 at 05:42
  • Hello. May I know where the source that said 1 TPS allows us to get 3600 recommendations per hour? – Muhammad Izzuddin Al Fikri Sep 06 '22 at 09:21
  • @MuhammadIzzuddinAlFikri it's by TPS definition, TPS = Transactions per Second, single hour has 3600 seconds – PatrykMilewski Sep 06 '22 at 23:53
3

The reason for such high price is because of created Campaign which exists and therefore running (this part of AWS Personalize uses more resources than uploading data to s3/creating a model. It is based on TPS-hour per month metric)

E.g. suppose you uploaded a dataset with 100000 rows

  1. Training will cost you about $0.24*2=0.5$ (assuming training took 2h)
  2. Uploading to s3 and dataset - almost free
  3. A created campaign which allows 1 request per second will cost $0.2*24*30=144$ per month

If in the production environment you will set a campaign to support 20 requests per second, it will be 2880$ per month.

So definitely, if these are your first steps with AWS Personalize, create campaigns only that support 1 request per second and verify that you delete unused resources on time.

In case of the SIMS recipe, there is also another way which might save you some money. Try to check how much it will cost for you just to retrain the model every 3d, for example, and to create batch recommendations for your items. Using this strategy we are spending now only 50$ per month per e-Shop instead of 1000$ per month.

Find more data in AWS docs

safinilnur
  • 199
  • 1
  • 4
  • I go for the apache predictionio .... As it will cost as less and also solve the purpose..., but it need little bit more study if you compare to AWS For reference below is the link https://predictionio.apache.org/ – pawansgi92 Sep 13 '20 at 22:28