DOCUMENTATION
/
Getting Started
Guides
Developer
Reference
Releases
Tutorials
Snowflake Open Catalog
Status
  1. Overview
    • Builders
    • Snowflake DevOps
      • Observability
        • Snowpark Library
        • Snowpark API
        • Machine Learning
        • Snowflake ML
        • Snowpark Code Execution Environments
        • Snowpark Container Services
        • Functions and procedures
        • Logging, Tracing, and Metrics
        • Snowflake APIs
        • Snowflake Python APIs
        • Snowflake REST APIs
        • SQL API
        • Apps
        • Streamlit in Snowflake
        • Snowflake Native App Framework
        • Snowflake Native SDK for Connectors
        • External Integration
        • External Functions
            1. Introduction to External Functions
              • Data Formats
                • Request and Response Translators
                  • Performance
                    • Best Practices
                      • AWS
                          1. Planning
                            • Creating Using AWS Management Console
                            • Creating Using AWS CloudFormation Template
                                1. Step 1: Create the Remote Service
                                  • Step 2: Get Gateway URL and Role ARN
                                    • Step 3: Create the API Integration
                                      • Step 4: Link the API Integration
                                        • Step 5: Create the External Function
                                      • Calling
                                        • Troubleshooting
                                      • Google Cloud
                                      • Azure
                                      • Security
                                    • Kafka and Spark Connectors
                                    • Snowflake Scripting
                                    • Snowflake Scripting Developer Guide
                                    • Tools
                                    • Snowflake CLI
                                    • Git
                                    • Drivers
                                    • Overview
                                    • Considerations when drivers reuse sessions
                                      • Reference
                                      • API Reference
                                        DeveloperExternal FunctionsAWSCreating Using AWS CloudFormation TemplateStep 4: Link the API Integration

                                        Step 4: Link the API integration for AWS to the proxy service in the Management Console¶

                                        This topic provides instructions for linking the API integration object in Snowflake to your proxy service (i.e. Amazon API Gateway). You do this by creating a trust relationship between Snowflake and the IAM (identity and access management) role you created earlier.

                                        The instructions are the same regardless of whether you are using the Management Console or the CloudFormation template.

                                        Previous step¶

                                        Step 3: Create the API integration for AWS in Snowflake

                                        Set up the trust relationship(s) between Snowflake and the new IAM role¶

                                        In the AWS Management Console:

                                        1. Select IAM.

                                        2. Select Roles.

                                        3. In the worksheet, look up the value in the New IAM Role Name field, then look for the same value (role name) in the AWS Management Console.

                                        4. Click on the Trust relationships tab, then click on the button Edit trust relationship.

                                          This should open the Policy Document into which you can add authentication information.

                                        5. In the Policy Document, find the Statement.Principal.AWS field and replace the value (not the key) with the value in the API_AWS_IAM_USER_ARN field of the worksheet.

                                        6. Find the Statement.Condition field. Initially, this should contain only curly braces (“{}”).

                                        7. Paste the following between the curly braces:

                                          "StringEquals": { "sts:ExternalId": "xxx" }

                                        8. Replace the xxx with the value for the API_AWS_EXTERNAL_ID field in the worksheet.

                                        9. After you are done editing the Policy Document for the trust relationship, it should look similar to the following:

                                          {
                                            "Version": "2012-10-17",
                                            "Statement": [
                                              {
                                                "Effect": "Allow",
                                                "Principal": {
                                                  "AWS": "arn:aws:iam::1234567898012:user/development/development_user"
                                                },
                                                "Action": "sts:AssumeRole",
                                                "Condition": {"StringEquals": { "sts:ExternalId": "EXTERNAL_FUNCTIONS_SFCRole=3_8Hcmbi9halFOkt+MdilPi7rdgOv=" }}
                                              }
                                            ]
                                          }
                                          
                                          Copy
                                        10. Click on Update Trust Policy.

                                        Next step¶

                                        Step 5: Create the external function for AWS in Snowflake

                                        Was this page helpful?

                                        Visit Snowflake
                                        Join the conversation
                                        Develop with Snowflake
                                        Share your feedback
                                        Read the latest on our blog
                                        Get your own certification
                                        Privacy NoticeSite Terms© 2025 Snowflake, Inc. All Rights Reserved.
                                        1. Previous step
                                        2. Set up the trust relationship(s) between Snowflake and the new IAM role
                                        3. Next step
                                        Language: English
                                        • English
                                        • Français
                                        • Deutsch
                                        • 日本語
                                        • 한국어
                                        • Português