Make S3 table data available to LakeSail
For S3-backed tables on LakeSail-managed compute, the underlying files must be in the workspace bucket for the workload's network. Use this guide if a catalog shows a table but LakeSail cannot read its data.
Transactional table formats
Do not use a direct S3 copy for Iceberg or Delta tables. Their metadata may reference the original files. Use a format-aware migration that rewrites the table into the workspace bucket.
Before you start
You need:
- The source S3 location and table format. For a partitioned table, check whether its partitions use separate locations.
- The workspace bucket for the target network. Its name is
lakesail-<connection-id>-<network-id>-ws. - An AWS identity that can read the source and write to the workspace bucket. If the source uses a customer-managed KMS key, it also needs permission to decrypt it.
Stop anything writing to the source until the migration is complete.
1. Choose the destination
Choose a location under the workspace bucket's catalogs/ folder. You can organize folders beneath it to match your data, for example:
s3://<workspace-bucket>/catalogs/<catalog-name>/<database>/<table>/Only the catalogs/ prefix is required. Glue table and partition locations must point to the paths you use.
2. Preview the copy
Use --dryrun to review the files before copying them:
aws s3 sync \
s3://<source-bucket>/<source-path>/ \
s3://<workspace-bucket>/catalogs/<target-path>/ \
--dryrunPreserve the existing partition folder structure. Do not use --delete during a migration.
3. Copy the data
Run the same command without --dryrun:
aws s3 sync \
s3://<source-bucket>/<source-path>/ \
s3://<workspace-bucket>/catalogs/<target-path>/See the AWS CLI s3 sync reference for copy options.
4. Update the catalog
In AWS Glue, update the table location to the new workspace path. If partitions have their own locations, update those as well. You can instead create a new table at the new location and switch workloads after validation.
You do not need to change the LakeSail catalog when the AWS Catalog ID and region stay the same. If either changes, create or update the catalog in LakeSail. If you moved the table to another Glue database, update Default Database when you want that database to be the default.
5. Validate and switch over
- Run the copy command with
--dryrunagain and confirm it reports no files to copy. - Confirm the table and partition locations in AWS Glue.
- Run a representative workload using a compute profile on the target network and read the table.
- Point data writers at the new location before resuming them.
Keep the source data until the migrated workloads have been verified.