aws-cloudformation / aws-cloudformation-templates

A collection of useful CloudFormation templates
Apache License 2.0
4.7k stars 4.28k forks source link

AWS::Cognito::UserPool LambdaVersion does not get set correctly #406

Open MyGuyCai opened 10 months ago

MyGuyCai commented 10 months ago

I am setting the value for AWS::Cognito::UserPool LambdaConfig PreTokenGenerationConfig LambdaVersion to 'V2_0'. I have checked the cloudformation template in the console and it is being correctly set. However, the Cognito pre token generation lambda version is set to V1, I have checked both in the console and by attempting to use the new features. I am able to set the version to 2 in the console and it works as intended.

Additional information: Using the serverless framework to deploy, although this shouldn't matter as the value is being set correctly confirmed in the console.

MyGuyCai commented 10 months ago

I have just had a thought, as the pre token generation lambda was deployed initially with the key PreTokenGeneration there may be an issue with the backwards capability. I will try completely removing the pre token generation lambda from the template then re-adding it to see if that fixes the problem. If it does I will raise a ticket in Cognito support.

MyGuyCai commented 10 months ago

Having removed the pre token generation lambda completely deploying, then re-adding and deploying gives the same result of the pre token generation lambda being version V1_0.

github-actions[bot] commented 7 months ago

Due to inactivity this issue will be closed in 7 days

ericzbeard commented 7 months ago

Which sample template is this about?