How do I set special parameters in an AWS Glue job using AWS CloudFormation?
2 minute read
I want to enable special parameters, such as --enable-metrics, for my job in AWS Glue. However, I get a template validation or "null values" error from AWS CloudFormation when I try to run my job. How do I resolve these errors?
To set special parameters for your job in AWS Glue, you must supply a key-value pair for the DefaultArguments property of the AWS::Glue::Job resource in CloudFormation. If you supply a key only in your job definition, then CloudFormation returns a validation error.
1. In your CloudFormation template, set the value of your special parameter to an empty string for the DefaultArguments property of your job definition.
Note: In the preceding example JSON and YAML templates, the value of --enable-metrics is set to an empty string. The empty string validates the template and launches the resource that's configured with the special parameter.