
Snowflake Migration from Azure to AWS v2
A guide an how to plan and migrate Snowflake data warehouses from Azure to AWS.
Series: Snowflake (3 articles)
- 2Snowflake Migration from Azure to AWS v2 This article
After several requests regarding migrating instances of Snowflake from Azure to AWS, this document is intended to describe the tools and processes to migrate. I begin with a description of the tools to use to plan and complete the migration, some important details to consider, how to inventory your source, and how to plan your migration. I also provide a sample migration plan. For securing Snowflake on AWS, please see my document on how to secure Snowflake data and access on AWS: Best Practices for Securing Snowflake on AWS v2.
Audience: customer architecture, data platform and migration teams.
Scope: migrating Snowflake accounts from Microsoft Azure to AWS using Snowflake account replication.
The Snowflake recommended tool for such migrations is to use Account Replication within Snowflake Organizations
This is their replication and failover/failback tool – it works across regions and across cloud providers as well. The basic process is as follows;
1. Create AWS account in same Snowflake Organization
2. Set up failover groups (Business Critical edition or higher) or replication groups (Standard/Enterprise) with all critical objects – see Edition Prerequisites below
3. Run replication on a frequent schedule to keep AWS copy current
4. When ready to cut over: promote secondary → primary on AWS
5. Redirect client connections to the new AWS account – preferably with Client Redirect connection objects so client connection URLs do not change
6. Decommission the Azure account
Edition Prerequisites and Setup
· Failover groups and replication of account objects (users, roles, warehouses, integrations, network policies, resource monitors, account parameters) require Business Critical edition or higher. Standard and Enterprise editions can replicate only databases and shares using replication groups.
· Business Critical path: create a failover group, replicate, then promote the AWS secondary to primary at cutover.
· Standard/Enterprise path: create a replication group for databases and shares, recreate account objects (users, roles, warehouses, integrations, policies) by script, and at cutover make the secondary databases writable (e.g. by removing them from the secondary replication group) instead of promoting. Consider a temporary upgrade to Business Critical for the migration window.
· The organization administrator (ORGADMIN) must enable replication for both the Azure source account and the AWS target account.
· Grant replication privileges (CREATE REPLICATION GROUP / CREATE FAILOVER GROUP, REPLICATE, FAILOVER, MONITOR). REPLICATE and FAILOVER privileges are not replicated and must be granted in each account.
· Example (source): CREATE FAILOVER GROUP fg_migration OBJECT_TYPES = USERS, ROLES, WAREHOUSES, DATABASES, INTEGRATIONS, NETWORK POLICIES ALLOWED_DATABASES = db1, db2 ALLOWED_INTEGRATION_TYPES = SECURITY INTEGRATIONS, API INTEGRATIONS, STORAGE INTEGRATIONS ALLOWED_ACCOUNTS = myorg.aws_account REPLICATION_SCHEDULE = '10 MINUTE';
· Example (target): CREATE FAILOVER GROUP fg_migration AS REPLICA OF myorg.azure_account.fg_migration;
· Tri-Secret Secure is not enabled automatically on target accounts. If used, provision the customer-managed key in AWS KMS and enable Tri-Secret Secure on the AWS account before replicating protected data.
· Snowflake PrivateLink on AWS requires Business Critical edition.
Some considerations for migrations using Account Replication
· Replication is asynchronous so the replicated target lags the source. It occurs on a scheduled basis (e.g. minutes, hours, or days), so the target can lag the source in terms of data recency. This is an important consideration for coexistence patterns: only one side can accept writes at any time, so applications must cut over to the target in a coordinated way.
· Replication is non-blocking: the source remains fully read-write during refreshes, and secondary objects on the target can be queried (read-only) until the group is promoted.
· Replication is uni-directional – from source to target. Thus, updates to the target are not replicated back to the source. This has implications on the migration pattern for applications and users.
· Depending on edition, replication includes databases, shares, users, roles, warehouses, integrations (security, API, notification, storage, external access), network policies, resource monitors and account parameters. Stages, pipes, UDFs and stored procedures replicate within replication/failover groups; Snowpipe Streaming requires supported SDK/Kafka connector versions.
· Replicated objects depend on the version of Snowflake being used (Standard, Enterprise, Business Critical, VPS). Refer to the Replication feature/edition Matrix for a list of which objects are replicated for each edition.
· Objects that are not replicated in any edition include:
o Temporary, External, Hybrid, and Event tables
o Temporary stages
o Iceberg tables that are not Snowflake managed (Snowflake managed Iceberg tables are replicated)
o Inbound shares
o Foreign key constraints that reference a primary/unique key in a different database
o Streamlit applications (verify current support in Snowflake documentation)
o Databases created from shares; files on user and table stages; files in external stages (only the stage definition replicates); Snowpipe using the classic Kafka connector; inbound QUEUE notification integrations; Time Travel and Fail-safe history. Materialized view data is rebuilt (and billed) on the target.
· Note: sequences, table constraints, privilege grants (when roles are replicated) and internal named stages ARE replicated. Stage files replicate only when a directory table is enabled, and files larger than 5 GB cause the refresh to fail.
· Integrations will require new trust policies for the replicated target, as well as network paths from integrated applications or data sources
· Replication groups allow only selected Snowflake objects to be replicated. This is useful for migrating specific databases or account objects when a phased migration approach is desired.
· A major consideration will be the migration pattern. A Strangler Fig pattern can be used, where select objects or databases are replicated in small pieces. For example, the data required for a single client can be moved from source to target, followed by the data for the next client, and so on. Group constraints shape the waves: an account can have only one group containing account objects, an object can belong to only one failover group, and an object cannot be in both a failover group and a replication group.
· Replication traffic flows between Snowflake deployments and does not traverse customer networks. Customer network capacity (Direct Connect, ExpressRoute or VPN) matters only for clients, ETL and integrations that remain on Azure while reading from or writing to the AWS account – size those links for the expected transaction rate and data throughput.
· Ensure integrations from Azure to AWS have the proper network path and trust relationships.
· Consider any Snowflake Marketplace subscriptions – are they needed at both the source and target, or just one.
· Verify there are no legal or regulatory restrictions for data transfer between regions
· When sharing views that reference multiple databases, all referenced databases must be included in the replication group
· All secondary objects are read-only; replicated object types (e.g. users, roles) cannot be created or changed on the target. Account objects created on the target by scripts (without global IDs) of a replicated type are dropped by the next refresh unless global IDs are applied.
· Map object dependencies (SNOWFLAKE.ACCOUNT_USAGE.OBJECT_DEPENDENCIES) so streams, views, policies, secrets and network rules are grouped with their referenced objects; otherwise refreshes fail with “dangling reference” errors.
· After promotion, warehouses arrive suspended, Time Travel history starts fresh on the target, and administrator resource monitor notifications must be reconfigured. Verify tasks, pipes, dynamic tables and data metric functions resume as expected.
· MFA enrollment does not carry over; users must re-enroll on the AWS account.
Start with an Inventory of Objects in the Source Snowflake
There are several methods for creating an inventory of objects in the source instance of Snowflake.
1. Snowsight UI – select Catalog->Database Explorer
2. SHOW Commands (Account-Wide)
Run these with
IN ACCOUNT to get a full inventory across all databases:-- DatabasesSHOW DATABASES; -- Schemas (across all databases)SHOW SCHEMAS IN ACCOUNT; -- Tables & ViewsSHOW OBJECTS IN ACCOUNT; -- tables + views combinedSHOW TABLES IN ACCOUNT; -- tables onlySHOW VIEWS IN ACCOUNT; -- views (including materialized & secure) -- Other object typesSHOW WAREHOUSES;SHOW USERS;SHOW ROLES;SHOW STAGES IN ACCOUNT;SHOW PIPES IN ACCOUNT;SHOW STREAMS IN ACCOUNT;SHOW TASKS IN ACCOUNT;SHOW PROCEDURES IN ACCOUNT;SHOW USER FUNCTIONS IN ACCOUNT;SHOW FILE FORMATS IN ACCOUNT;SHOW SEQUENCES IN ACCOUNT;SHOW SHARES;SHOW NETWORK POLICIES;SHOW INTEGRATIONS;SHOW EXTERNAL FUNCTIONS IN ACCOUNT;SHOW REPLICATION GROUPS;SHOW FAILOVER GROUPS;SHOW CONNECTIONS;3. INFORMATION_SCHEMA (Per Database)
Each database has an
INFORMATION_SCHEMA with metadata views:-- For a specific database:SELECT * FROM my_database.INFORMATION_SCHEMA.TABLES;SELECT * FROM my_database.INFORMATION_SCHEMA.VIEWS;SELECT * FROM my_database.INFORMATION_SCHEMA.COLUMNS;SELECT * FROM my_database.INFORMATION_SCHEMA.SCHEMATA;SELECT * FROM my_database.INFORMATION_SCHEMA.TABLE_STORAGE_METRICS;4. ACCOUNT_USAGE Schema (Historical + Account-Wide)
The
SNOWFLAKE shared database gives you account-level views with history:Note: ACCOUNT_USAGE views lag behind real time (about 90 minutes for TABLES, up to 3 hours for OBJECT_DEPENDENCIES). Use SHOW commands or INFORMATION_SCHEMA for the current state.
-- Comprehensive account-wide inventorySELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.DATABASES;SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.TABLES;SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.VIEWS;SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.COLUMNS;SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.STAGES;SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.PIPES;SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.FUNCTIONS;SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.PROCEDURES;SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.ROLES;SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.USERS;SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.GRANTS_TO_ROLES;SELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.GRANTS_TO_USERS; -- Storage/size infoSELECT * FROM SNOWFLAKE.ACCOUNT_USAGE.TABLE_STORAGE_METRICS;5. Quick Inventory Script
A consolidated approach to output a full migration inventory:
-- Summary count by object type per database/schemaSELECT table_catalog AS database_name, table_schema AS schema_name, table_type, COUNT(*) AS object_countFROM SNOWFLAKE.ACCOUNT_USAGE.TABLESWHERE deleted IS NULLGROUP BY 1, 2, 3ORDER BY 1, 2, 3; -- Flag objects that WON'T replicateSELECT table_catalog, table_schema, table_name, table_typeFROM SNOWFLAKE.ACCOUNT_USAGE.TABLESWHERE deleted IS NULL AND (table_type IN ('EXTERNAL TABLE','EVENT TABLE','TEMPORARY TABLE') OR is_hybrid = 'YES' OR is_iceberg = 'YES') -- review Iceberg rows: only Snowflake-managed Iceberg tables replicateORDER BY table_type, table_catalog, table_schema; -- Object dependencies (to design replication groups)SELECT referencing_database, referencing_object_name, referencing_object_domain, referenced_database, referenced_object_name, referenced_object_domainFROM SNOWFLAKE.ACCOUNT_USAGE.OBJECT_DEPENDENCIESWHERE referencing_database <> referenced_database;6. Snowflake CLI
snow object list table --in-accountsnow object list view --in-accountNote: the object type is a positional argument; use --in database <db_name> to limit the scope to one database.
Identify Integration Rework (Azure to AWS)
· Storage integrations: Azure consent-based access is replaced by S3 buckets and an IAM role trust policy; typically create new storage integrations rather than repointing replicated ones.
· Notification integrations: Azure Event Grid / Storage Queue notifications are replaced by Amazon SQS/SNS; reconfigure Snowpipe auto-ingest before failover. Inbound QUEUE notification integrations do not replicate.
· External functions: Azure API Management is replaced by Amazon API Gateway; recreate the API integration trust and re-grant remote service access.
· SSO/SCIM (Microsoft Entra ID): security integrations replicate, but the IdP must be updated with the AWS account ACS/redirect URLs and SCIM endpoint.
· Re-platforming Azure Data Factory, Azure Functions or other Azure services to AWS is optional modernization and can be decoupled from the Snowflake cutover.
Plan Cutover, Client Redirect and Rollback
· Use Client Redirect connection objects (Business Critical) or organization-based account URLs so clients do not require new connection strings.
· Cutover sequence: freeze changes, suspend the replication schedule, run a final refresh and confirm completion (promotion cannot occur during a refresh), promote the AWS secondary (ALTER FAILOVER GROUP fg_migration PRIMARY;), fail over connection objects (ALTER CONNECTION … PRIMARY;), resume warehouses and validate.
· Rollback/failback: after promotion the Azure account remains a secondary and can be refreshed in reverse, providing a ready rollback path until decommissioning.
Validate the Migration
· Compare row counts and HASH_AGG(*) checksums per table between source and target at the same refresh point.
· Run sampled business queries and compare results and runtimes.
· Monitor refresh history and lag (REPLICATION_GROUP_REFRESH_HISTORY) and confirm pipes with SYSTEM$PIPE_STATUS.
Cost Considerations
· Replication compute and cross-cloud data transfer are billed to the target account; monitor with REPLICATION_GROUP_USAGE_HISTORY.
· Storage is paid in both accounts during the coexistence period.
· Large tables with frequent updates or deletes are expensive to replicate; use less frequent refresh schedules for them.
· Materialized views are maintained (and billed) on the target; Azure egress applies to anything still reading Azure Blob storage.
Commercial, Account and Post-Migration Considerations
· Plan transfer of Snowflake capacity commitments to the AWS account and evaluate purchasing via AWS Marketplace.
· Evaluate AWS migration funding programs (e.g. MAP) where applicable.
· Communicate new account identifiers and URLs to downstream consumers.
· After migration, consider cross-region replication within AWS for disaster recovery.
Appendix A: Sample Migration Plan
Phase 1: Discovery and Assessment
Environment Analysis
Conduct comprehensive inventory of Snowflake objects
· Document all databases, schemas, tables, views (as per above)
· Note non-replicated objects that require manual replication
· Map all users, roles, and permissions
Migrate First, Optimize Second
· Plan on a replication of source to target without changing the target – this will speed migration and reduce potential errors
· After migration is complete, only then focus on performance and cost optimizations on the target
Analyze current performance characteristics
· Gather query history for performance benchmarks. These will be used to ensure your target meets or exceeds the source performance.
· Document warehouse configurations and utilization patterns
· Identify optimization opportunities for the target only after the migration is complete
· Establish performance baselines for validation
Integration Mapping
Document all integration points with Azure services
· Map Azure Blob Storage stages and storage integrations to S3 equivalents
· Identify Azure Data Factory workflows (optional modernization to AWS Glue – can be decoupled from cutover)
· Document Azure Functions / API Management used by external functions (rework to Lambda / API Gateway)
· Analyze Microsoft Entra ID (Azure AD) SSO/SCIM integration – IdP must be updated for the AWS account
Assess network connectivity requirements
· Document existing network connectivity and bandwidth
· Identify private connectivity needs (PrivateLink requirements)
· Determine bandwidth requirements for clients and integrations that remain on Azure (replication itself does not use customer networks)
· Assess latency requirements for applications
Requirements & Strategy Development
Define AWS architecture requirements
· Design target VPC architecture with security groups
· Plan secure connectivity to Snowflake – PrivateLink
· Identify connectivity requirements for external ISV systems on AWS
· Plan IAM roles and policies
· Define S3 bucket structure and permissions
· Design CloudWatch monitoring approach
Develop detailed migration strategy
· Create object migration sequence
· Develop data migration approach
· Define cutover methodology and rollback procedures.
· Establish testing and validation frameworks to ensure completeness of data and equivalence of performance on the target instance.
· Consider data timelines in testing. For example, if some data is received or summarized only on a nightly, weekly, or monthly basis, ensure all data ingestion works as desired on that frequency. This may extend testing timelines.
· Set migration timeline and milestones
· Confirm Snowflake edition (Business Critical required for failover groups, account-object replication and AWS PrivateLink)
· Design replication/failover group waves using object dependencies
Phase 2: AWS Environment Setup
Infrastructure Preparation
Set up AWS networking infrastructure
· Create VPC with appropriate subnets and routing
· Configure security groups and NACLs
· Set up PrivateLink endpoints for Snowflake
· Establish connectivity between Azure and AWS for clients/integrations that remain on Azure: ExpressRoute ↔ Direct Connect via a colocation/interconnect provider (e.g. Equinix, Megaport), or site-to-site VPN for lower volumes. Configure DNS (Route 53 Resolver / private hosted zones) for PrivateLink endpoints.
Configure AWS identity and security
· Set up IAM roles and policies for Snowflake
· Configure AWS KMS customer-managed key if Tri-Secret Secure is used
· Set up necessary cross-account permissions
· Implement appropriate security monitoring
Snowflake Account Setup
Create and configure Snowflake on AWS
· Provision Snowflake account in the appropriate AWS region within the same Snowflake organization; enable replication (ORGADMIN)
· Account parameters, resource monitors and network policies replicate on Business Critical; on other editions recreate them by script (apply global IDs)
· Set up resource monitors and usage alerts
· Configure network policies and IP allowlists
Prepare migration tools and utilities
· Setup SnowSQL clients and connection profiles
· Prepare Snowpipe auto-ingest using SQS/SNS notifications on S3
· Prepare scripts for non-replicated objects and account objects (Standard/Enterprise)
· Create validation frameworks and tools
Phase 3: Pilot Migration
Schema & Small Dataset Migration
Migrate database objects for pilot
· Create a pilot replication/failover group for selected databases and run the initial refresh
· Manually recreate only non-replicated objects (external tables, hybrid tables, etc.)
· Create new storage integrations and external stages pointing to AWS S3
· Validate object consistency and functionality
Set up test integrations
· Configure connections to AWS services
· Set up test ETL processes using AWS Glue
· Establish test connections from BI tools
· Configure sample data flows
Pilot Data Migration & Testing
Execute pilot data migration
· Run scheduled refreshes of the pilot group
· Monitor refresh duration, lag and cost (REPLICATION_GROUP_REFRESH_HISTORY / USAGE_HISTORY)
· Document refresh times and tune replication schedules
· Validate data integrity post transfer
Perform functionality testing
· Verify query results match between environments
· Test stored procedures and UDFs
· Validate external functions
· Test data loading processes
Pilot Validation & Refinement
Conduct performance testing
· Run benchmark queries against migrated data
· Compare performance with Azure environment
· Tune warehouse configurations
· Test concurrency handling
Refine migration process
· Update migration procedures based on pilot learnings
· Optimize replication group composition and schedules
· Enhance validation processes
· Update cutover plan
Phase 4: Full Migration Execution
Schema and Metadata Migration
Migrate all database objects
· Add remaining databases and account objects to replication/failover groups in planned waves
· Run initial refreshes and establish refresh schedules within lag SLAs
· Manually recreate all non-replicated objects
· Set up all external sources with AWS S3 integration
· Validate schema integrity and completeness
Set up security configuration
· Users and roles replicate on Business Critical; otherwise create by script with global IDs
· Update SSO/SCIM IdP configuration for the AWS account
· Set up row/column security policies
· Establish masking policies
· Configure network policies
Full Data Migration
Execute phased data migration
· Replicate data in prioritized waves (replication groups)
· Stagger refresh schedules for large or high-churn databases
· Implement data validation after each batch
· Monitor replication lag against SLA
· Load only non-replicated data (e.g. external table sources, stage files) manually
Establish all integrations
· Set up connections to all AWS services
· Configure all ETL/ELT processes using AWS native services
· Establish connections with all BI and analytics tools
· Test all integration points with full data volumes
Pre-Cutover Validation
Perform comprehensive validation
· Verify all data has been transferred correctly
· Run data integrity checks across all tables
· Validate all database objects function as expected
· Verify all integrations are working properly
Conduct performance testing
· Run full suite of benchmark tests
· Compare with Azure performance metrics
· Make final adjustments to warehouses and configurations
· Verify SLAs can be met
Phase 5: Cutover and Stabilization
Cutover Execution
Prepare for cutover
· Communicate timeline to all stakeholders
· Implement change freeze in Azure environment
· Perform final data synchronization
· Ready rollback procedures
· Suspend replication schedule and complete a final refresh before promotion
Execute cutover
· Promote the AWS secondary failover group to primary (Azure becomes read-only secondary)
· Perform final data validation
· Fail over Client Redirect connections, or update connection points to the new AWS environment
· Redirect all ETL processes to AWS
· Update all BI tools to point to AWS environment
· Resume warehouses; verify tasks, pipes and dynamic tables
· Rollback: fail back by promoting the Azure account if critical issues occur
Stabilization
Post-cutover monitoring
· Closely monitor system performance
· Track query performance against baselines
· Monitor user experience and feedback
Optimization and fine-tuning
· Adjust warehouse sizes based on actual usage
· Tune query performance as needed
· Optimize integrations with AWS services
· Implement any required security adjustments
Phase 6: Optimization and Decommissioning
Environment Optimization
Performance optimization
· Analyze query patterns and performance
· Implement clustering keys based on actual usage
· Optimize materialized views
· Fine-tune warehouse auto-scaling
Process optimization
· Enhance ETL/ELT processes with AWS-native capabilities
· Implement AWS-specific monitoring and alerting
· Optimize cost management using AWS and Snowflake tools
· Implement enhanced automation using AWS services
Knowledge Transfer and Decommissioning
Documentation and knowledge transfer
· Update all documentation to reflect AWS environment
· Train administrators on AWS-specific aspects
· Document lessons learned from migration
· Create operational run books for the new environment
Azure environment decommissioning
· Retain the Azure account as a secondary (or use Snowflake backups/snapshots, or export to storage) for the retention period
· Maintain Azure environment for agreed retention period (typically 30-90 days), aligned to contract end dates
· Gradually reduce Azure resources as confidence in AWS environment grows
· Execute controlled shutdown of Azure environment
Series: Snowflake (3 articles)
- 2Snowflake Migration from Azure to AWS v2 This article
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article