Configuring Instagram Ads connections - Amazon Glue
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Configuring Instagram Ads connections

Instagram Ads supports the AUTHORIZATION_CODE grant type for OAuth2.

  • This grant type is considered three-legged OAuth as it relies on redirecting users to the third-party authorization server to authenticate the user. It is used when creating connections via the Amazon Glue console.

  • Users may still opt to create their own connected app in Instagram Ads and provide their own client ID and client secret when creating connections through the Amazon Glue console. In this scenario, they will still be redirected to Instagram Ads to login and authorize Amazon Glue to access their resources.

  • This grant type results in an access token. An expiring system user token is valid for 60 days from a generated or refreshed date. To create continuity, the developer should refresh the access token within 60 days. Failing to do so results in forfeiting the access token and requires the developer obtain a new one to regain API access. See Refresh Access Token.

To configure a Instagram Ads connection:

  1. In the Amazon Glue Data Catalog, create a connection by following the steps below:

    1. When selecting a Connection type, select Instagram Ads.

    2. Select the Amazon IAM role which Amazon Glue can assume and has permissions for the following actions:

      { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "secretsmanager:DescribeSecret", "secretsmanager:GetSecretValue", "secretsmanager:PutSecretValue", "ec2:CreateNetworkInterface", "ec2:DescribeNetworkInterface", "ec2:DeleteNetworkInterface", ], "Resource": "*" } ] }
    3. Provide the User Managed Client Application Client ID.

    4. Select the secretName which you want to use for this connection in Amazon Glue to put the tokens. The selected secret needs to have a key USER_MANAGED_CLIENT_APPLICATION_CLIENT_SECRET with the value being the Client Secret from the connected app.

    5. Select the network options if you want to use your network.

  2. Grant the IAM role associated with your Amazon Glue job permission to read secretName.

  3. In your Amazon Glue job configuration, provide connectionName as an Additional network connection.