What you will be able to do
- Explain why external stages authenticate through a storage integration instead of embedded credentials
- Complete the AWS trust relationship for an S3 storage integration using DESC STORAGE INTEGRATION output
- Scope an integration with STORAGE_ALLOWED_LOCATIONS, STORAGE_BLOCKED_LOCATIONS and ENABLED
- Create named external stages that keep loading and unloading working when exfiltration controls are switched on
Key concept
Generated IAM entity — Snowflake creates the cloud identity itself and stores it in an object such as a storage integration, and your cloud administrator grants that identity access to buckets. No secret key or token is ever stored in a stage or typed into a statement.
1.Why stages authenticate through a storage integration
An external stage points Snowflake at files in an S3 bucket, a GCS bucket or an Azure container. Snowflake still has to prove to the cloud provider that it is allowed to read or write those files. A stage can carry that proof in two ways. It can embed credentials, such as an AWS key ID and secret key or an Azure SAS token. Or it can reference a storage integration: a named, first-class object that holds an identity Snowflake generated for you, plus a list of locations that identity may be used for.
The integration approach keeps long-lived keys out of SQL completely. Nobody pastes a secret into CREATE STAGE, and nobody has to rotate keys in every stage definition. On S3, Snowflake creates one IAM user for the whole Snowflake account, and every S3 storage integration in the account refers to that same user. An integration is not a set of stored keys, and it has no IAM identity of its own for each integration or owner role. It is a pointer to that account-wide user, together with the IAM role your AWS administrator lets it assume.
Creating an integration is a privileged act because it decides which cloud locations the whole account can reach. Only ACCOUNTADMIN, or a role holding the global CREATE INTEGRATION privilege, can run the command. One integration can then serve many stages, which can point at different buckets and paths.
CREATE STORAGE INTEGRATION <integration_name>
TYPE = EXTERNAL_STAGE
STORAGE_PROVIDER = 'S3'
ENABLED = TRUE
STORAGE_AWS_ROLE_ARN = '<iam_role>'
STORAGE_ALLOWED_LOCATIONS = ('<protocol>://<bucket>/<path>/', '<protocol>://<bucket>/<path>/')
[ STORAGE_BLOCKED_LOCATIONS = ('<protocol>://<bucket>/<path>/', '<protocol>://<bucket>/<path>/') ]Checkpoint 1 of 9· Fill the gap
Your AWS administrator has created an IAM role for Snowflake and given you its ARN. Which parameter completes this S3 storage integration so that no secret key ever appears in SQL?
CREATE STORAGE INTEGRATION <integration_name>
TYPE = EXTERNAL_STAGE
STORAGE_PROVIDER = 'S3'
ENABLED = TRUE
? = '<iam_role>'
STORAGE_ALLOWED_LOCATIONS = ('<protocol>://<bucket>/<path>/', '<protocol>://<bucket>/<path>/')
[ STORAGE_BLOCKED_LOCATIONS = ('<protocol>://<bucket>/<path>/', '<protocol>://<bucket>/<path>/') ]The integration stores the ARN of the IAM role your AWS administrator created, and Snowflake's generated identity assumes that role. You never supply keys. AWS_SECRET_KEY and AWS_ROLE are CREDENTIALS options on CREATE STAGE, not integration parameters.
Source: docs.snowflake.comCheckpoint 2 of 9· Check yourself
A Snowflake account has three S3 storage integrations, each owned by a different role and each pointing at a different bucket. How many Snowflake-side AWS IAM identities must the AWS administrator trust?
Snowflake creates one IAM user for the whole account, and every S3 storage integration refers to it. Integrations differ in the IAM role they assume and the locations they allow, not in the user.
“Snowflake creates a single IAM user that is referenced by all S3 storage integrations in your Snowflake account.”Source: docs.snowflake.com
Sources1
2.Completing the AWS trust relationship
Setting up S3 access is a handshake with a chicken-and-egg problem. The integration needs the ARN of an IAM role. The role's trust policy needs to know which Snowflake identity may assume it. The documented order works around this. The AWS administrator first creates an IAM policy granting the bucket permissions. Next comes a role that trusts the administrator's own AWS account as a placeholder, with Require external ID ticked and a dummy value such as 0000. Then the integration is created in Snowflake with that role ARN in STORAGE_AWS_ROLE_ARN.
The placeholder trust policy is the step people forget to come back to. While the role still trusts only the customer's own account, Snowflake's IAM user cannot assume it, and stage creation fails with access denied. To fix it, run DESC STORAGE INTEGRATION <name> and record two properties. Then edit the role's trust policy so that the principal is STORAGE_AWS_IAM_USER_ARN and the external ID condition requires STORAGE_AWS_EXTERNAL_ID. If you didn't set an external ID when you created the integration, Snowflake generates one. Two fixes that look plausible don't work. Storing access keys on the integration abandons the reason integrations exist. Trusting the ARN of the Snowflake role that owns the integration fails because AWS never sees Snowflake roles, only the account's IAM user.
| Property | What it is | Where it goes in AWS |
|---|---|---|
| STORAGE_AWS_IAM_USER_ARN | The single IAM user Snowflake provisions for your Snowflake account, shared by all S3 integrations | Principal allowed to call sts:AssumeRole on the role |
| STORAGE_AWS_EXTERNAL_ID | The external ID Snowflake uses to establish the trust relationship; generated if you didn't supply one | External ID condition on the trust policy, replacing the 0000 placeholder |
The IAM policy attached to the role decides what the stage can actually do. Reading needs s3:GetBucketLocation, s3:GetObject, s3:GetObjectVersion and s3:ListBucket. Unloading also needs s3:PutObject. Purging files after a load, or running REMOVE, needs s3:DeleteObject. A read-only policy is therefore a real control: a stage on that integration can load, but COPY INTO <location> to it will fail at the AWS layer.
Revoking access is not instant. Snowflake caches the temporary credentials it gets by assuming the role, for no longer than their 60-minute expiry. Users may keep listing and reading files until the cache expires. Plan any emergency cut-off with that window in mind.
Checkpoint 3 of 9· Check yourself
During a suspected breach, at 10:00 the AWS administrator removes Snowflake's IAM user from the trust policy of the role behind a storage integration. What should the security team expect from stages that use that integration?
Snowflake assumes the role and caches the temporary credentials it gets back, for no longer than their 60-minute expiry. Revoking trust in AWS doesn't cancel credentials Snowflake already holds, so access can continue until the cache expires.
“If you revoke access from Snowflake, users might be able to list files and access data from the cloud storage location until the cache expires.”Source: docs.snowflake.com
Checkpoint 4 of 9· Exam question
An administrator creates a storage integration for an S3 bucket and builds an IAM role whose trust policy names the customer's own AWS account. CREATE STAGE using the integration then fails with an access denied error. What should the administrator do to fix the trust relationship?
Correct answer: C — Run DESC STORAGE INTEGRATION, then trust STORAGE_AWS_IAM_USER_ARN as principal and require STORAGE_AWS_EXTERNAL_ID as the sts:ExternalId in the trust policy.
- A. Incorrect. Storage integrations are designed to avoid stored credentials, and they have no access-key properties; the delegation works through role assumption only.
- B. Incorrect. Snowflake roles are not AWS principals, and the account locator is not the external ID; the generated IAM user ARN and external ID come from the integration description.
- C. Correct. Snowflake generates an IAM user and external ID for each integration, and the role must trust exactly that principal with that external ID before Snowflake can assume it.
- D. Incorrect. Storage integrations authenticate by Snowflake assuming the IAM role, so the role trust policy has to name Snowflake's IAM user; a bucket policy on a VPC endpoint does not replace that.
Sources1
3.Scoping an integration with allowed and blocked locations
STORAGE_ALLOWED_LOCATIONS is the list of buckets, and optionally paths, that stages on this integration may reference. You can give several URLs, or * for every bucket. Paths are case-sensitive prefixes, so s3://corp-data/HR/ and s3://corp-data/hr/ are different locations. A stage's URL must fall inside one of the allowed entries.
STORAGE_BLOCKED_LOCATIONS works alongside the allowed list and subtracts from it. It forbids stages on the integration from referencing the listed buckets or paths. It is typically paired with a broad allowed list, * or a whole bucket, to carve out the parts nobody should touch. Suppose an integration allows s3://corp-data/ and compliance wants s3://corp-data/hr/ unreachable while every other prefix keeps working. The change is ALTER STORAGE INTEGRATION setting STORAGE_BLOCKED_LOCATIONS = ('s3://corp-data/hr/'), with the allowed list left alone. Replacing the allowed list with the HR path does the opposite: HR becomes the only reachable prefix. A PATTERN clause on each COPY INTO is a filter someone has to remember. It is not a boundary, so the stage can still reach the prefix.
ENABLED is the integration's master switch, and it reaches further than it looks. With TRUE, the default, stages work normally. With FALSE, nobody can create new stages on the integration, and existing stages lose access to their storage. That makes it the fastest way to freeze every stage built on one cloud identity at once, but also an easy way to break production by accident.
Checkpoint 5 of 9· Check yourself
An integration has STORAGE_ALLOWED_LOCATIONS = ('s3://corp-data/HR/'). An engineer tries to create a stage on it with URL = 's3://corp-data/hr/payroll/'. What happens?
Paths in the allowed list are case-sensitive, so hr/ is a different location from HR/ and falls outside the allowed entry. The stage URL has to align with an allowed location.
“path is an optional case-sensitive path for files in the cloud storage location”Source: docs.snowflake.com
Checkpoint 6 of 9· Exam question
A storage integration permits s3://corp-data/ but the compliance team now requires that the s3://corp-data/hr/ prefix be unreachable from any stage built on this integration, while all other prefixes keep working. What is the most appropriate change?
Correct answer: B — Run ALTER STORAGE INTEGRATION to set STORAGE_BLOCKED_LOCATIONS = ('s3://corp-data/hr/') while leaving the allowed location list as it is.
- A. Incorrect. Revoking usage removes access to every prefix, not just the HR one, and it pushes teams back toward embedded credentials, which weakens the control.
- B. Correct. Blocked locations are evaluated alongside allowed ones, so the HR prefix is excluded while the rest of the bucket stays reachable through the integration.
- C. Incorrect. That would permit only the HR prefix, which is the opposite of the requirement, and it would break every other prefix currently in use.
- D. Incorrect. A
PATTERNis chosen by the caller of each statement and does not enforce anything at integration level, so users could simply omit it.
Sources2
4.Creating named external stages on an integration
A named external stage stores a URL plus a way to authenticate, and for S3 and Azure the syntax makes those two options mutually exclusive. A stage takes either STORAGE_INTEGRATION = <name> or a CREDENTIALS = (...) block, never both. For GCS, the integration is the only option the syntax offers. S3-compatible storage is the exception the other way: it takes an ENDPOINT and key credentials, with no integration clause.
externalStageParams (for Amazon S3) ::=
URL = '<protocol>://<bucket>[/<path>/]'
[ AWS_ACCESS_POINT_ARN = '<string>' ]
[ { STORAGE_INTEGRATION = <integration_name> } | { CREDENTIALS = ( { { AWS_KEY_ID = '<string>' AWS_SECRET_KEY = '<string>' [ AWS_TOKEN = '<string>' ] } | AWS_ROLE = '<string>' } ) } ]The stage URL is checked against the integration. A stage on s3://corp-data/finance/ succeeds if the integration allows s3://corp-data/ and blocks nothing on that path. A stage on s3://other-bucket/ fails. Two other limits are worth knowing. A stage cannot read objects in archival classes that must be restored first, such as S3 Glacier Flexible Retrieval, Glacier Deep Archive or Azure Archive Storage. And when the stage sits on a different cloud or region from the account, unloading to it incurs a per-byte fee.
CREDENTIALS is still the right choice in one case. A storage integration can reach cloud storage in a government region only from a Snowflake account in that same government region, and the same holds for regions in China. Outside those pairings, the stage has to supply credentials directly. If storage on another cloud platform sits in a virtual private environment, an integration can't reach it either: cross-cloud locations must be in the public cloud.
Checkpoint 7 of 9· Fill the gap
A data engineer is creating an S3 stage. Security policy says the stage must not embed an AWS key or role, and must authenticate through an existing integration object. Which parameter fills the blank in the stage syntax?
externalStageParams (for Amazon S3) ::=
URL = '<protocol>://<bucket>[/<path>/]'
[ AWS_ACCESS_POINT_ARN = '<string>' ]
[ { ? = <integration_name> } | { CREDENTIALS = ( { { AWS_KEY_ID = '<string>' AWS_SECRET_KEY = '<string>' [ AWS_TOKEN = '<string>' ] } | AWS_ROLE = '<string>' } ) } ]A stage names its integration with STORAGE_INTEGRATION. The syntax makes this clause an alternative to the CREDENTIALS block, so a stage uses one or the other, never both. STORAGE_AWS_ROLE_ARN is set on the integration itself, STORAGE_AWS_IAM_USER_ARN is a value that DESC STORAGE INTEGRATION returns, and EXTERNAL_VOLUME belongs to Iceberg tables.
Source: docs.snowflake.com5.Designing stages that survive data exfiltration controls
Several account parameters close the routes data could leak through. They are covered in Data exfiltration parameters. What matters here is the design consequence: once they are on, the integration and its named stages become the only way in or out of cloud storage, so they have to be in place first.
REQUIRE_STORAGE_INTEGRATION_FOR_STAGE_CREATION = TRUE means any CREATE STAGE for a private location has to reference a storage integration. A CREDENTIALS = (...) stage fails. Every bucket a team will need must therefore already be covered by STORAGE_ALLOWED_LOCATIONS on some integration. Otherwise the request turns into an integration change by ACCOUNTADMIN, which is the review point the policy is meant to create. A companion parameter goes further. It requires loads and unloads against private storage to go through a named stage that uses an integration, so older credential-based stages stop working too.
PREVENT_UNLOAD_TO_INLINE_URL = TRUE blocks COPY INTO 's3://...' statements that carry the URL and access settings inline. Unloads must target a named stage, internal or external, or a user or table stage. Any pipeline that writes to an external bucket needs a named external stage whose definition holds the URL and the integration, and that stage's IAM role needs s3:PutObject. Together, these two parameters meet the policy 'no inline credentials in stages, no raw URLs in unloads'. Settings such as PERIODIC_DATA_REKEYING or SSO_LOGIN_PAGE address encryption and sign-in, not where data can be written.
Checkpoint 8 of 9· Check yourself
With REQUIRE_STORAGE_INTEGRATION_FOR_STAGE_CREATION and PREVENT_UNLOAD_TO_INLINE_URL both set to TRUE, a team needs to unload query results to s3://partner-exports/daily/. No storage integration in the account lists this bucket in STORAGE_ALLOWED_LOCATIONS. What is the correct way to enable this?
With these parameters on, stages must reference an integration and unloads must target a named stage. The stage URL also has to fall inside the integration's allowed locations, so a new bucket means an ACCOUNTADMIN change to the integration, which is the review point the policy is meant to create. Writing to the bucket then also needs s3:PutObject on the IAM role.
“The URL in the stage definition must align with the storage location specified for the STORAGE_ALLOWED_LOCATIONS parameter.”Source: docs.snowflake.com
Checkpoint 9 of 9· Exam question
A security policy states that nobody may create a stage with an inline credentials string and that unloads must never target a raw cloud storage URL typed into a COPY INTO statement. Select TWO account parameters that enforce this.(Select 2)
Correct answers: A, E — Set PREVENT_UNLOAD_TO_INLINE_URL = TRUE so that COPY INTO <location> statements cannot write to a cloud storage URL given directly in the command.; Set REQUIRE_STORAGE_INTEGRATION_FOR_STAGE_CREATION = TRUE so that new external stages must reference a storage integration rather than embed credentials.
- A. Correct. This parameter blocks unloads that pass an inline URL, forcing unloads to go through a named stage, which can be governed by an integration.
- B. Incorrect. This parameter only influences the physical column types in unloaded Parquet files; it has no effect on destination or authentication rules.
- C. Incorrect. Rekeying rotates encryption keys for data at rest in Snowflake storage; it does not constrain how stages are created or where unloads can write.
- D. Incorrect. This parameter changes what the login page shows for SSO; it does not restrict stage creation or unload destinations.
- E. Correct. With this enabled,
CREATE STAGEon an external location fails unless a storage integration is specified, so credentials can no longer be embedded in stage definitions.
Sources4
Sources
(4)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Integrations are named, first-class Snowflake objects that avoid the need for passing explicit cloud provider credentials such as secret keys or access tokens.”
↩︎ Why stages authenticate through a storage integration“Snowflake creates a single IAM user that is referenced by all S3 storage integrations in your Snowflake account.”
↩︎ Why stages authenticate through a storage integration“Only account administrators (users with the ACCOUNTADMIN role) or a role with the global CREATE INTEGRATION privilege can execute this SQL command.”
↩︎ Why stages authenticate through a storage integration“In the Account ID field, enter your own AWS account ID temporarily. Later, you modify the trust relationship and grant access to Snowflake.”
↩︎ Completing the AWS trust relationship“Modify the policy document with the DESC STORAGE INTEGRATION output values you recorded”
↩︎ Completing the AWS trust relationship“The external ID that Snowflake uses to establish a trust relationship with AWS.”
↩︎ Completing the AWS trust relationship“Either automatically purge files from the stage after a successful load or execute REMOVE statements to manually remove files.”
↩︎ Completing the AWS trust relationship“Snowflake creates a single IAM user that is referenced by all S3 storage integrations in your Snowflake account.”
↩︎ Exam trap 3“Snowflake caches the temporary credentials for a period that cannot exceed the 60-minute expiration time.”
↩︎ Exam trap 4“If you revoke access from Snowflake, users might be able to list files and access data from the cloud storage location until the cache expires.”
↩︎ Checkpoint - 2.
“path is an optional case-sensitive path for files in the cloud storage location”
↩︎ Scoping an integration with allowed and blocked locations“Commonly used when STORAGE_ALLOWED_LOCATIONS is set to the * wildcard, allowing access to all buckets in your account except for blocked storage locations”
↩︎ Scoping an integration with allowed and blocked locations“If you enclose the entire STORAGE_BLOCKED_LOCATIONS value in quotes, the value is invalid.”
↩︎ Scoping an integration with allowed and blocked locations“The URL in the stage definition must align with the storage location specified for the STORAGE_ALLOWED_LOCATIONS parameter.”
↩︎ Creating named external stages on an integration“In these cases, use the CREDENTIALS parameter in the CREATE STAGE command (rather than using a storage integration) to provide the credentials for authentication.”
↩︎ Creating named external stages on an integration“A storage integration is a Snowflake object that stores a generated identity and access management (IAM) entity for your external cloud storage”
↩︎ Key concept“Explicitly prohibits external stages that use the integration from referencing one or more storage locations”
↩︎ Exam trap 1“Existing stages that reference this integration cannot access the storage location in the stage definition.”
↩︎ Exam trap 2“Existing stages that reference this integration cannot access the storage location in the stage definition.”
↩︎ Prediction“The URL in the stage definition must align with the storage location specified for the STORAGE_ALLOWED_LOCATIONS parameter.”
↩︎ Checkpoint - 3.
“You cannot access data held in archival cloud storage classes that requires restoration before it can be retrieved.”
↩︎ Creating named external stages on an integration - 4.
“Creating an external stage to access a private cloud storage location requires referencing a storage integration object as cloud credentials.”
↩︎ Designing stages that survive data exfiltration controls“Loading data from or unloading data to a private cloud storage location requires using a named external stage that references a storage integration object”
↩︎ Designing stages that survive data exfiltration controls“COPY INTO <location> statements must reference either a named internal (Snowflake) or external stage or an internal user or table stage.”
↩︎ Designing stages that survive data exfiltration controls“A named external stage must store the cloud storage URL and access settings in its definition.”
↩︎ Designing stages that survive data exfiltration controls