serverless / serverless/serverless

cognitoUserPool Function Events Refers to pools as "Pool" not "ARN", "Name", "Id"

Open
#8,269 1 comment 0 reactions 1 assignee View on GitHub

@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.

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.