Very similar, but I got this
Failed to create resource. User: arn:aws:sts::845110609621:assumed-role/propswap-jeanc-IamRoleCustomResourcesLambdaExecuti-1BXRS6XB57ESY/propswap-jeanc-custom-resource-existing-cup is not authorized to perform: iam:PassRole on resource: arn:aws:iam::845110609621:role/propsw3a762d80_sns-role-jeanc See details in CloudWatch Log: 2019/08/23/[$LATEST]5ad3be449c4f4e84a5835cdc4c5a2a53
With the following:
userAfterAuthenticate:
timeout: 61
handler: handlers/user/afterAuthenticate.js
events:
- cognitoUserPool:
pool: ${file(amplify/custom.js):custom.user_pool_name}
trigger: PostAuthentication
existing: true