'AWS Glue CLI - Job Parameters

We are currently updating glue job using CLI commands. In the console, we have the ability to add job parameters as such:

Job parameters in Console

I would like to replicate this in the CLI command. Currently, I have the following:

-name: Update Glue job
 run: |
    aws glue update-job --job-name "${{ env.notebook_name }}-job" \
       --job-update "Role=${{ env.glue_service_role }}, Command={Name=glueetl, ScriptLocation=${{ env.aws_s3_bucket }}/etl/${{ env.notebook_name }}_${GITHUB_SHA}.py}, DefaultArguments={'--job-bookmark-option':'job-bookmark-enable', '--enable-metrics': 'enable', '--enable-continuous-cloudwatch-log': 'enable'}" \
       --region ${{ env.region }}

My assumption is that I cannot add this job parameter under "DefaultArguments". I was using the following AWS Doc: https://docs.aws.amazon.com/cli/latest/reference/glue/update-job.html. I did not see a job parameter options.

What am I missing? Thank you!



Solution 1:[1]

You have to use default arguments if you believe that the values won't change. Otherwise, you have to pass the arguments while triggering the glue job from CLI something like this

aws glue start-job-run --job-name my-job --arguments myarg='myavlue'

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Tula