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)
- Serverless support command occasionally includes the wrong command in report HOT 1
- Template generation produces incorrect template when Policies are specified using an intrinsic.
- `Fn::ForEach` Supported but an error is thrown on the CLI
- Node minimum version requirements? HOT 7
- Lambda invokeMode as RESPONSE_STREAM is not set in deployment
- Add support for docker build --cache-to / remote registry caching
- Unable to build v4 for testing HOT 1
- Error: Cannot find module 'node:events' HOT 3
- dependency [email protected] is vulnerabilty HOT 1
- Missing support for Ruby 3.3 runtime
- Add support for Dockerfile --secret
- Breaking Change in NodeJS 20.12.2 (Error: spawn EINVAL) HOT 3
- Serverless transpiling before provider environment variables initialization HOT 1
- custom-resource-existing-cup needs upgrade HOT 1
- Expose aws partition variable along with account id and region - https://github.com/serverless/serverless/blob/main/lib/configuration/variables/sources/instance-dependent/get-aws.js HOT 3
- Deep dependency on this critical vulnerability version of formdiable HOT 2
- The Serverless version (3.38.0) does not satisfy the "frameworkVersion" (2.72.3) in serverless.yml
- `AxiosError` on deployment
- TypeError: Cannot convert undefined or null to object at Function.keys
- Error: GraphQL schema has not yet been created. Make sure to call the "GraphQLSchemaHost#schema" getter when the application is already initialized (after the "onModuleInit" hook triggered by either "app.listen()" or "app.init()" method).
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.