# Migrate From v3

SST v4 upgrades the underlying [Pulumi AWS provider](https://www.pulumi.com/registry/packages/aws/) from v6 to v7. This guide covers migrating your SST v3 apps to v4.

For the full list of upstream changes, refer to the [Pulumi AWS v7 migration guide](https://www.pulumi.com/registry/packages/aws/how-to-guides/7-0-migration).

---

## [Breaking changes](https://sst.dev/docs/migrate-from-v3/#breaking-changes)

No code changes are needed if you are only using SST components without transforms or direct `@pulumi/aws` usage. Otherwise, refer to the [Pulumi AWS v7 migration guide](https://www.pulumi.com/registry/packages/aws/how-to-guides/7-0-migration) for the full list of breaking changes.

The internal changes to SST components were minimal: mostly S3 resource renames (dropping the `V2` suffix) and switching from `tags` to `tagsAll`. You can see the full list of changes in the [upgrade PR](https://github.com/anomalyco/sst/pull/6259/).

---

## [Migration steps](https://sst.dev/docs/migrate-from-v3/#migration-steps)

When you update SST and the AWS provider version changes, `sst deploy` will be blocked until you migrate your state:

1. **Install the latest v4**  
   Make sure you’re on the latest v4 version before running any commands.

2. **Update your config**  
   If you have any breaking changes from above, update your `sst.config.ts` accordingly.

3. **Review changes**  
   Run `sst diff` to preview what will change. This is a **one-way migration**, so it’s worth reviewing first.
   
   ```
   sst diff
   ```

4. **Migrate state**  
   Run `sst refresh` to migrate your state.
   
   ```
   sst refresh
   ```

Repeat for each stage.
   
   ```
   sst refresh --stage production
   ```

If the stage was deployed using `sst dev`, use the `--dev` flag.
   
   ```
   sst refresh --dev
   ```

If you [share resources across stages](https://sst.dev/docs/share-across-stages), run `sst refresh` on the stage where the resource is created first — not the stage that references it via `.get()`.

5. **Deploy**  
   Once refreshed, deploy as usual.
   
   ```
   sst deploy
   ```

That’s it — once refreshed and deployed, your app is fully migrated to v4.

---

## [Upgrade testimonials](https://sst.dev/docs/migrate-from-v3/#upgrade-testimonials)

Upgrading your infra framework can feel scary. Here’s what teams have shared in Discord after migrating:

[Successfully migrated two projects to SST v4.\
\
waterbear](https://discord.com/channels/983865673656705025/985222825893822485/1484243262058397829) [We just had a succesful upgrade too! Thanks team.\
\
Zac](https://discord.com/channels/983865673656705025/1481358917106929786/1481383395618459771) [I just migrated our production app to SST v4. It's a fairly complex app with frontends, REST APIs, plenty of backend processes, usage of S3 buckets, DynamoDB, RDS, etc.\
\
Everything just worked fine.\
\
Rodrigo](https://discord.com/channels/983865673656705025/983865673656705028/1481358917106929786) [Excellent work on the upgrade to v4! I did a large project upgrade with no problems.\
\
sockthedev](https://discord.com/channels/983865673656705025/983865673656705028/1476430580173508800) [We flawlessly upgraded our production environment to v4 (ECS, RDS, SQS, etc.)\
\
marv](https://discord.com/channels/983865673656705025/983865673656705028/1489243087166378197)
