There are even a bunch of duplicates when I go to ...
# help
k
There are even a bunch of duplicates when I go to Cognito in the aws console. How do I prevent this?
f
They are not duplicates. User pool names are not unique
You can set the default removal policy to
destroy
if you want user pools to be removed on
sst remove
.
k
Yes I had already set it previously
Copy code
export default function main(app) {
  app.setDefaultFunctionProps({
    runtime: "nodejs16.x",
    srcPath: "backend",
    bundle: {
      format: "esm",
    },
  });

  if (app.stage === "dev") {
    app.setDefaultRemovalPolicy("destroy");
  }

  app.stack(StorageStack).stack(AuthApiStack).stack(FrontendStack);
}
f
In ur screenshots, a lot of them are for stage
kenny
maybe consider changing
Copy code
if (app.stage === "dev")
to
Copy code
if (app.stage !== "prod")
k
Ok