Luke Wyman
08/28/2021, 12:25 AMAuth
stack uses a function in the singers module, because it creates a singer from the user record in the Cognito UserPool in the postConfirmation
Cognito trigger. The Singers
stack points to the singers module, too, because it handles the rest of the singers functionality.
This wasn't an issue back in my Node days, but now seems to be a hassle with Python. Since Python uses srcPath
to point to the folder, and then the route just points to the lambda file itself, it seems that Auth
stack is claiming all the lambda files in the singers folder, and then when the Singers
stack tries to claim the remainder of the lambda files, it can't have any because:
Building Lambda function src/services/singers/KAR_SNG_get_singer_by_id.handler
Error: Asset is already associated with another stack 'test-karaoke-auth'. Create a new Code instance for every stack
I could create a separate folder for that one function that Auth needs, and I will if I have to, but it feels like a bit of a hack. Is there a configuration refinement I can use to not let Auth
be greedy and steal all the lambdas in Singers
?Frank
Frank
Frank
Luke Wyman
08/29/2021, 5:31 PMLuke Wyman
08/30/2021, 1:45 AMv0.40.4
. Has cleaned up the shared python lambdas folder nicely - no technical debt/hacks here! Thanks, @Frank!Frank