According to https://docs.aws.amazon.com/glue/latest/dg/aws-glue-api-jobs-job.html#aws-glue-api-jobs-job-GetJob the Action GetJob (AWS Glue) should return CodeGenConfigurationNodes for a given JobName as input however it only returns the Job object.

Am I missing a request parameter that is undocumented? Is there another way to get the CodeGenConfigurationNodes for an AWS Glue Job in Step Functions?

[UPDATE]

OK I tried using the get_job() python function in a Lambda:

#!/usr/bin/python
# -*- coding: utf-8 -*-

import json
import boto3
glue = boto3.client(service_name='glue', region_name='eu-west-2',
              endpoint_url='https://glue.eu-west-2.amazonaws.com')
              
              
def lambda_handler(event, context):
    job_name = event.get('JobName')
    
    job_details = glue.get_job(JobName = job_name)
    return json.dumps(job_details, indent=4, sort_keys=True, default=str)

And that doesn't return a CodeGenConfigurationNodes either, so a bug in the python library?

1

There are 1 best solutions below

0
ameltz On

CodeGenConfigurationNodes is only returned if the job is a glue studio job. Jobs that are not Glue Studio jobs do not have CodeGenConfigurationNodes as CodeGenConfigurationNodes represents the visual DAG.