When using Cognito, most of the APIs require UserPoolId and/or ClientId. User pools link up just fine with resources, however the CognitoUserPoolClient does not.
One such example is the ConfirmSignUpCommand from @aws-sdk/client-cognito-identity-provider, which requires a ClientId. Linking just doesn't seem to work for the client - no resource is generated in the types.generated.ts file for the client; only the user pool.
You might notice that in order to work around this, I had to pipe the client id into the environment of the lambda function to access through process.env rather than Resource.
When using Cognito, most of the APIs require UserPoolId and/or ClientId. User pools link up just fine with resources, however the CognitoUserPoolClient does not.
One such example is the
ConfirmSignUpCommand
from@aws-sdk/client-cognito-identity-provider
, which requires aClientId
. Linking just doesn't seem to work for the client - no resource is generated in the types.generated.ts file for the client; only the user pool.Example sst config:
In the above case, the Resource types look like this:
You might notice that in order to work around this, I had to pipe the client id into the environment of the lambda function to access through process.env rather than
Resource
.