https://serverless-stack.com/ logo
#help
Title
# help
k

Kenny

06/04/2022, 5:39 PM
There are even a bunch of duplicates when I go to Cognito in the aws console. How do I prevent this?
f

Frank

06/05/2022, 8:50 PM
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

Kenny

06/05/2022, 9:05 PM
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

Frank

06/05/2022, 9:29 PM
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

Kenny

06/05/2022, 9:38 PM
Ok