serverless / serverless/serverless
cognitoUserPool Function Events Refers to pools as "Pool" not "ARN", "Name", "Id"
Open
@colinbjohnson is already working on this.
Since Sep 21, 2020.
bug/design
cat/aws-event-cognito
needs feedback
- Dominant language
- JavaScript
- Stars
- 46.9k
- Forks
- 5.7k
- Avg merge
- 10h 7m
- Merged PRs (30d)
- 57
Description
When using a cognitoUserPool event within a function, the property used to refer to a User Pool resource is called a "pool". This creates a lack of clarity when configuring an event for which to associate a function.
- AWS documentation refers to
cognitoUserPoolresources by either Arn (as a CloudFormation Output) or Id (as a CloudFormation Output) or PoolName or UserPoolName (as a CloudFormation Property).
serverless.yml
service: service
provider:
name: aws
region: us-west-2
runtime: nodejs12.x
stage: ${opt:stage}
functions:
functionname:
handler: function.handler
events:
- cognitoUserPool:
existing: true
# pool is ambiguous in meaning
pool: poolname
trigger: UserMigration
serverless deploy output
colinjohnson@cjohnson07 lambdas % serverless deploy
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Installing dependencies for custom CloudFormation resources...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service service.zip file to S3 (1.11 KB)...
Serverless: Uploading custom CloudFormation resources...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
.......
Serverless: Stack update finished...
Service Information
service: service
stage: dev
region: us-west-2
stack: auth-dev
resources: 9
api keys:
None
endpoints:
None
functions:
function
layers:
None
Serverless: Removing old service artifacts from S3...
Installed version
Framework Core: 2.1.1
Plugin: 4.0.4
SDK: 2.3.2
Components: 3.1.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.