-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cognito User Pool SMS configuration problem #1252
Comments
Why was this closed @karakter98 ? Did you resolve your problem? I'm in the process of converting a CloudFormation template to a SAM template and experiencing the same error. |
I've created a PR to fix this mistake: #1582 |
Hi there. Was there ever any resolution to this issue @karakter98 ? |
@snowhalo we ended up ditching the SMS verification feature altogether because of this. I have no idea if it's been fixed in the meantime. |
@lafiosca has this effort been abandoned? |
* correct CognitoUserPool SmsConfiguration type from list of dict to dict; fixes #1252 * Add tests for cognito userpool sms configuration type change Co-authored-by: Daniel Mil <mladan@amazon.com>
Description:
When trying to create a Cognito user pool using SAM templates, SAM throws the error
when specifying SmsConfiguration property.
In the template, there is also a Lambda trigger that has Cognito configured as an event source.
After looking through the project and doing some tests, I believe the error could appear in the samtranslator module:
'SmsConfiguration': PropertyType(False, list_of(dict)),
From the CloudFormation docs, SmsConfiguration seems to be a simple dict, but in the code snippet above, it is validated as a list of dicts.
Indeed, if I modify the corresponding part of the template from a mapping to a YAML list consisting of a single object, validation passes, but when the stack is created by CloudFormation, it fails with
which is consistent with the type of the property specified in the CloudFormation docs.
Steps to reproduce the issue:
<template_location>/src/pre_signup_validation/lambda_function.py
sam deploy --template-file build/packaged-template.yaml --stack-name test --no-execute-changeset
Observed result:
SAM validates the SmsConfiguration parameter of Cognito user pools as a list of type dict.
Expected result:
Validation should be consistent with CloudFormation specification.
The text was updated successfully, but these errors were encountered: