For my AWS batch job I would like to pass multiple parameters like height, width, and a list of strings when I submit the batch job and retrieve them inside my program.
I would like to pass these values as parameters to submit_job.
parameters = {
'width': 320,
'height': 240,
'aspect_ratio': 1.78,
'image_format': ['.jpg', '.png']
}
response = batch.submit_job(
jobName=jobName,
jobQueue=job_queue,
jobDefinition=job_def,
parameters=parameters
)
this is how interpret it inside my program.
width= sys.argv[0]
height=sys.argv[1]
aspect_ratio = sys.argv[2]
image_format = sys.argv[3]
this is how I defined my run command.
["python","./script.py", "Ref::width", "Ref::height"]
The error I get is ""Error submitting job: Parameter validation failed:\nInvalid type for parameter parameters.width, value: 340, type: <class 'int'>, valid types: <class 'str'>