DOCUMENTATION
/
Get started
Guides
Developer
Reference
Release notes
Tutorials
Status
  1. Overview
    • Builders
    • Snowflake DevOps
      • Observability
        • Snowpark Library
        • Snowpark API
        • Spark workloads on Snowflake
        • 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
          1. About Streamlit in Snowflake
            • Getting started
              1. Deploy a sample app
                • Create and deploy Streamlit apps using Snowsight
                  • Create and deploy Streamlit apps using SQL
                    • Create and deploy Streamlit apps using Snowflake CLI
                    • Streamlit object management
                      1. Billing considerations
                        • Security considerations
                          • Privilege requirements
                            • Understanding owner's rights
                              • PrivateLink
                                • Logging and tracing
                                • App development
                                  1. Runtime environments
                                    • Dependency management
                                      • File organization
                                        • Secrets and configuration
                                          • Editing your app
                                          • Migrations and upgrades
                                            1. Identify your app type
                                              • Migrate to a container runtime
                                                • Migrate from ROOT_LOCATION
                                                • Features
                                                  1. Git integration
                                                    • External access
                                                      • Row access policies
                                                        • Sleep timer
                                                        • Limitations and library changes
                                                          • Troubleshooting Streamlit in Snowflake
                                                            • Release notes
                                                              • Streamlit open-source library documentation
                                                            • Snowflake Native App Framework
                                                            • Snowflake Declarative Sharing
                                                            • 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
                                                                                          • Scala versions
                                                                                            • 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 TermsCookies Settings© 2025 Snowflake, Inc. All Rights Reserved.

                                                                                              Alternative interfaces

                                                                                              Snowflake Python APIs

                                                                                              Snowflake REST APIs

                                                                                              Snowflake CLI

                                                                                              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