New properties in AWS::Cognito::UserPool
cannot be used with Cognito event
#3042
Labels
AWS::Cognito::UserPool
cannot be used with Cognito event
#3042
Description
See #2581 for original issue.
Steps to reproduce
Save as
template.yaml
:Transform:
Which fails:
Thoughts
from_dict()
inResource
is the entry point:serverless-application-model/samtranslator/model/eventsources/push.py
Line 1203 in f6b8794
serverless-application-model/samtranslator/model/__init__.py
Line 169 in f6b8794
It stores the properties as object attributes, and does validation when storing:
serverless-application-model/samtranslator/model/__init__.py
Lines 316 to 317 in f6b8794
And retrieving them:
serverless-application-model/samtranslator/model/__init__.py
Lines 298 to 302 in f6b8794
We could either add the unknown properties as attributes like usual, or perhaps better, store the initial resource dictionary, and in
to_dict()
merge, failing in case of conflict (to ensure it doesn't silently overwrite properties from customer template).Also... does this affect any other resources? Maybe ones that use
from_dict()
as well?The text was updated successfully, but these errors were encountered: