Is it possible to dynamically change the capacity-upfront for EMR cluster using Data Pipeline?

0

Main problem

I understand that is no need to add Auto Scaling to an EMR cluster launched by Data Pipeline. Instead, we can specify the capacity up-front and it will be used for the duration of the job. But what if I am doing transformation on some data weekly basis and the instance type size needed do this every week, and I can't be sure about how many nodes are required in the cluster for better performance?

Possible solution?

At the moment, I can predict the amount of data that EMR could process thanks to the number of events tracked in a period of time on OpenSearch (where EMR will extract data), E.g. If 1 EMR node can handle 1,000 events and the actual number of events was 10,000 then create 10 nodes.

I though on create an EventBridge cron job to execute a Lambda function ~10 minutes before the Data pipeline process and calculate the number of nodes, then store the value in a service like SSM parameter store. So when the Data Pipeline starts, I can be able to retrieve the value and pass it as a parameter for the task.

This may sound a little complicated so I would like to know if there's maybe an easier way to achieve this, thanks in advance!

已提問 2 年前檢視次數 141 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南