sst / ion

SST v3
https://sst.dev
MIT License
1.88k stars 221 forks source link

Feat: CognitoIdentityPool links #510

Closed urosbelov closed 2 months ago

urosbelov commented 3 months ago

Hello to all, yesterday I tried to link CognitoIdentityPool to Nextjs app, and ION cannot manage to make Resource for it. I have also tried to link it to Function, but again, without succeed.

Did anyone have same issue?

jayair commented 3 months ago

Can you share what you tried and if you got an error for it?

urosbelov commented 3 months ago
  1. I have created CognitoIdentityPool export const identityPool = new sst.aws.CognitoIdentityPool("IdentityPool", {userPools: [{userPool: cognitoUserPool.id,client: cognitoClientWeb.id}]});

  2. Linked it to Nextjs App export const web = new sst.aws.Nextjs("TestApp", {link: [cognitoUserPool, cognitoClientWeb, identityPool], path: "packages/frontend", openNextVersion: "3.0.2"});

And in Nextjs app there is no access to Resource.IdentityPool.id. Other links, cognitoUserPool and cognitoClientWeb works as expected.

Then I tried to link it to lambda function to test, and same behavior.

jayair commented 3 months ago

Yeah right now it's not exposed. You can see this by looking at the sidebar in the docs for the "Links".

https://ion.sst.dev/docs/component/aws/cognito-identity-pool/

I think we could add support for it.

arjunyel commented 2 months ago

@urosbelov hi friend, how did you end up working around this?