*Q1*: I’ve already created a cognito identity pool...
# help
a
Q1: I’ve already created a cognito identity pool and user pool and iam policy via console followed an earlier version guide. Do I still need to pass APIs to auth stack? If yes, how?
f
Hey @Aso Sun, what do you mean by “pass APIs to auth stack”? Can you show me a snippet?
a
Yeah, it’s like this
Copy code
new AuthStack(app, "auth", {
    api: apiStack.api,
    bucket: storageStack.bucket,
  });
f
Are you importing ur existing identity pool and user pool into the
sst.Auth
construct?
I’d recommend creating new identity pool and user pool again in SST.
a
Actually, is there any other ways to provide authentication for my APIs in SST ? besides
sst.Auth
f
Yeah, you can use JWT or use a custom Lambda authorizer to protect the api.
There are quite a few examples on Api authentication here https://serverless-stack.com/examples/index.html
a
Thank you Frank! Is there a way to use SST Stack to create a new IAM role and attach to the existing identity pool? otherwise I have to manually update IAM permission to my existing identity pool each time.
f
Ah I see. I think what you can do is import the IAM role, and add additional policies to it in SST.
a
Thank you very much!