Thanks for handling it.
export const preSignUp = defineFunction({
name: "pre-sign-up",
resourceGroupName: 'auth',
});
...
export const auth = defineAuth({
...
triggers: {
preSignUp
},
access: (allow) => [
allow.resource(preSignUp).to([
'listUsers',
'manageUsers'
])
],
});
...
const backend = defineBackend({
auth,
data,
preSignUp
});
const authArn = backend.auth.resources.userPool.userPoolArn;
backend.preSignUp.resources.lambda.addToRolePolicy(
new iam.PolicyStatement({
sid: 'AllowCognitoOperations',
effect: Effect.ALLOW,
actions: [
'cognito-idp:ListUsers',
'cognito-idp:AdminLinkProviderForUser',
'cognito-idp:ListIdentityProviders',
],
resources: [authArn],
}));
Description
Hello!
I was trying to link existing social accounts with same email and I am currently stuck trying to add AdminLinkProviderForUser permission to the lambda role.
No action seem to map it (see this list), and trying to link it manually cause a circular dependency.
Thanks for handling it.
Categories
Steps to Reproduce
e.g.:
Screenshots
No response
Platforms
Flutter Version
3.27.1
Amplify Flutter Version
2.5.0
Deployment Method
Amplify Gen 2
Schema
No response