Skip to content

Instantly share code, notes, and snippets.

@ioxua
Created July 6, 2021 18:40
Show Gist options
  • Save ioxua/bbf40b84bc38d7693b7d24ceab7ddb0c to your computer and use it in GitHub Desktop.
Save ioxua/bbf40b84bc38d7693b7d24ceab7ddb0c to your computer and use it in GitHub Desktop.
AWS CloudFormation Recipes

So, in order to create a Glue Job that's able to connect to ANYTHING AT ALL inside a VPC, you'll have to create a AWS::Glu::Connection as such:

  GlueJobVPCConnection:
    Type: AWS::Glue::Connection
    Properties:
      CatalogId: !Ref AWS::AccountId
      ConnectionInput:
        Name: !Sub "${AWS::StackName}-vpc-connection"
        ConnectionType: NETWORK
        PhysicalConnectionRequirements:
          SubnetId: !Ref SubnetID
          AvailabilityZone: !Ref AvailabilityZone
          SecurityGroupIdList:
            - !Ref SecurityGroupId

  GlueJob:
    Type: AWS::Glue::Job
    Properties:
      Connections:
        Connections:
        - !Sub "${AWS::StackName}-vpc-connection"

All these parameters are REQUIRED.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment