Hi,
I recently switched my AWS CLI credentials to my personal account and then switched back to my work account. However, when I run sst dev, it seems to recreate all the resources instead of using the existing ones. It also doesn’t preserve the state of my previously deployed stage.
Is there a way to make SST use the existing deployed stack and avoid recreating everything? Would appreciate any help on this!
Thanks!
Are you sure both credentials point at the same AWS account and region? SST v3 keeps its state in a bucket inside the account and region it deploys to, so if the personal account was active when you ran sst dev, it would have looked for state there and created a fresh set of resources. Running aws sts get-caller-identity before sst dev, and pinning the profile and region in your config or env vars, should show whether it is now reading the right state. I do a lot of small AWS deploys and have been bitten by a stale AWS_PROFILE in a shell more than once. Did the stage name stay the same between the two runs?