Knowledge Center Monthly Newsletter - March 2025
Stay up to date with the latest from the Knowledge Center. See all new and updated Knowledge Center articles published in the last month and re:Post’s top contributors.
我想在 AWS Glue 中使用特殊参数,例如 --enable-metrics。当运行作业时,我收到来自 AWS CloudFormation 的模板验证或“null values”(空值)错误。
要为您的 AWS Glue 作业设置特殊参数,您必须为 CloudFormation 中 AWS::Glue::Job 资源的 DefaultArguments 属性提供键值对。如果您仅在作业定义中提供密钥,则 CloudFormation 会返回验证错误。
要解决此问题,请完成以下步骤:
"MyJob": { "Type": "AWS::Glue::Job", "Properties": { "Command": { "Name": "glueetl", "ScriptLocation": "s3://my-test//test-job1" }, "DefaultArguments": { "--job-bookmark-option": "job-bookmark-enable", "--enable-metrics": "" }, "ExecutionProperty": { "MaxConcurrentRuns": 2 }, "MaxRetries": 0, "Name": "cf-job3", "Role": { "Ref": "MyJobRole" } } }
MyJob: Type: 'AWS::Glue::Job' Properties: Command: Name: glueetl ScriptLocation: 's3://my-test//test-job1' DefaultArguments: '--job-bookmark-option': job-bookmark-enable '--enable-metrics': '' ExecutionProperty: MaxConcurrentRuns: 2 MaxRetries: 0 Name: cf-job3 Role: !Ref MyJobRole