Workload Identity Federation for Amazon S3 Storage integrations¶
This topic describes how to configure a Snowflake storage integration for Amazon S3 using Workload Identity Federation (WIF). With WIF, Snowflake uses an OpenID Connect (OIDC) trust relationship instead of a shared IAM user and external ID, so there are no long-lived credentials to manage.
Prerequisites¶
- Access to an AWS account with permissions to create IAM identity providers and roles.
- An Amazon S3 bucket that you want Snowflake to access.
- A Snowflake account with a role that has the
CREATE INTEGRATIONprivilege (for example,ACCOUNTADMIN).
Step 1: Retrieve Snowflake’s OIDC issuer URL¶
Retrieve Snowflake’s OIDC issuer URL before configuring anything on the AWS side. You set this URL as the issuer when you create the AWS identity provider in the next step.
In Snowflake, run:
Copy the output. You use it in the next step.
Step 2: Create an identity provider in AWS¶
Use the output from Step 1 to set up a new identity provider in AWS.
- In your AWS console, go to IAM > Identity providers > Add provider.
- Select Web Identity.
- For Provider URL, enter the URL from Step 1.
- For Audience, enter audience of choice (e.g.
sts.amazonaws.com) - Select Add provider.
Step 3: Create the IAM role in AWS¶
To configure access permissions for Snowflake in the AWS Management Console, do the following:
-
From the left-hand navigation pane in the Identity and Access Management (IAM) Dashboard, select Roles.
-
Select Create role.
-
Select Web identity and, from the drop-down, find the provider and audience you configured in Step 2.
-
Add permissions for access (use an existing policy or an inline policy).
An example inline policy that grants the role access to your bucket might look like the following:
-
On the role summary page, locate and record the Role ARN value. In the next step, you create a Snowflake integration that references this role.
Step 4: Create the storage integration in Snowflake¶
Create a storage integration that references the IAM role ARN from the previous step:
Step 5: Verify the integration¶
Verify the integration by running DESC INTEGRATION:
Look for these rows in the output:
| property | property_value |
|---|---|
AUTH_TYPE | WORKLOAD_IDENTITY_FEDERATION |
STORAGE_AWS_ROLE_ARN | arn:aws:iam::XXXXXXX:role/my-role |
WORKLOAD_IDENTITY_FEDERATION_ISSUER | https://<auto-generated URL> |
WORKLOAD_IDENTITY_FEDERATION_SUBJECT | identity_external_stage_integration_<hex> |
Key things to note:
- Issuer and subject are system-generated: you didn’t provide them. Snowflake creates a unique cryptographic identity for this integration automatically.
- No
STORAGE_AWS_IAM_USER_ARN: there’s no shared IAM user. WIF replaces the traditional trust model entirely. - No
STORAGE_AWS_EXTERNAL_ID: OIDC trust replaces the external ID mechanism.
Step 6: Create an external stage¶
Verify the stage works:
The LIST command should return an empty result (no files yet) without errors.
Note
If you get an access denied error, wait 1–2 minutes and retry. AWS OIDC provider propagation can take up to 60 seconds.
Step 7: Upload and query data (Optional)¶
This step is an optional walkthrough that verifies end-to-end access by unloading sample data to the stage and loading it back.
Upload a file (unload)¶
Verify the file exists:
You should see one or more CSV files listed.
Load data back from the stage¶
You should see the 3 rows (Alice, Bob, Charlie) loaded back successfully.
Limitations and considerations¶
During Private Preview, the following limitations apply:
- Cross-cloud and cross-partition configurations aren’t supported.
- Reads from a replicated storage integration on the replicated secondary aren’t supported. Reads work after the secondary becomes the primary.
- Sovereign and federated clouds aren’t supported.