Search code examples
amazon-web-servicesaws-cloudformationaws-glue

AWS Cloudformation: is there a way to capture Glue ARN for use in a step function?


My task is to create a cloudformation template that produces a glue job and then sets that glue job up as the first step function task.

I have the two pieces working separately, but I don't seem to be able to get the Glue job ARN, if there even is one created:

https://theburningmonk.com/cloudformation-ref-and-getatt-cheatsheet/

If it is created, according to this cheatsheet, it's not available to cloudformation GetAtt ..

Am I missing something? Any way to do this?


Solution

  • AWS::Glue::Job does not return its ARN.

    However, you can construct it yourself, since Glue job ARN has known format and !Ref <glue-job-resource> returns job name.

    So for example to return Arn in Outputs, you could do the following:

    Outputs:
      JobArn:
        Value: !Sub "arn:${AWS::Partition}:glue:${AWS::Region}:${AWS::AccountId}:job/${<glue-job-resource>}"