For this first method we are going to submit the application using the rest api. In order to do that we are going to run this request in a terminal:
curl -k -X POST \
'https://api.spotinst.io/ocean/spark/cluster/<your cluster id>/app?accountId=<your accountId>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ...' \
-d '{
"jobId": "spark-pi",
"configTemplateId": "ocean-workshop",
"configOverrides":
{
"type": "Python",
"sparkVersion": "3.2.0",
"mainApplicationFile": "local:///opt/application/main.py",
"image": <replace-with-the-image-that-we-pushed-to-ecr>
}
}'
this way we specified the template id that we want and we change with the configOverride