Comments (2)
I'd also like to use this feature.
Unfortunately, it seems the line you've posted here doesn't control the allowed versions for PreTokenGeneration events, as it only gets evaluated when the trigger is one of "CustomEmailSender" or "CustomSMSSender"
See:
When I simply try to set the lambdaVersion
in my event configuration for the PreTokenGeneration trigger, I get this error:
Warning: Invalid configuration encountered
at 'functions.MyFunction.events.1.cognitoUserPool': unrecognized property 'lambdaVersion'
from serverless.
I was able to do this by specifying the LambdaConfig in the UserPool resource, e.g
UserPool:
Type: AWS::Cognito::UserPool
Properties:
UserPoolAddOns:
AdvancedSecurityMode: "AUDIT"
LambdaConfig:
PreTokenGenerationConfig:
LambdaArn: arn:aws:lambda:${aws:region}:${aws:accountId}:function:{$self:service}-${self:provider.stage}-preTokenGeneration
LambdaVersion: V2_0
...
Also specify permission else it won't be able to invoke it
PreTokenGenerationLambdaInvokePermission:
Type: "AWS::Lambda::Permission"
Properties:
FunctionName: arn:aws:lambda:${aws:region}:${aws:accountId}:function:{$self:service}-${self:provider.stage}-preTokenGeneration
Action: "lambda:InvokeFunction"
Principal: "cognito-idp.amazonaws.com"
from serverless.
Related Issues (20)
- V4: .env variables do not work in serverles.yml HOT 1
- V4: Default deploymentMethod 'direct' or 'changesets' HOT 3
- [v4] Unable to use basic cli functionality like help without aws credentials HOT 3
- Custom resource uses wrong datatype for version HOT 4
- existing:true S3 Bucket Still Tries to get deleted HOT 3
- `logs.restApi: true` fails to deploy HOT 10
- Serverless deploy not working HOT 1
- [Serverless V4] The "exclude" keyword doesn't work for esbuild HOT 4
- MIT License is a misnomer. The actual framework is closed-source and licensed.
- ESBuild plugin support (Serverless 4) HOT 4
- Bug with version 4.1.8 when trying to deploy HOT 3
- API Gateway Rest API V1 Access Logging creation HOT 3
- Does the S3 property under Provider section no longer create buckets anymore?
- Unable to Disable esbuild in Serverless 4.1.11 HOT 7
- Unable to bundle @aws-sdk in v4 HOT 4
- Recoverable error occurred (Socket connection timeout)
- [V4] Dev mode: handler not found in service directory HOT 1
- Unable to Enable "Helpers for Encryption in Transit" for Environment Variables in Python Lambda HOT 1
- Serverless4 with Typescript Support No Longer Automatically Verifies Typescript Compilation HOT 2
- Cross account security group rule id erroring as invalid HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serverless.