-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
I'm trying to create a SAM template to use in multiple development stages.
In some stages, I have to use AutoPublishAlias (production stages); in other stages (like development or test) I don't need and I don't whant AutoPublishAlias.
But, if I use conditions to set the property
Parameters:
DeployStack:
Type: String
Conditions:
CreateProdResources: !Equals [ !Ref DeployStack, 'prod' ]
AutoPublishAlias: !If [CreateProdResources, !Ref DeployStack, !Ref AWS::NoValue]
, I have this error:
Resource with id [HelloWorldFunction] is invalid. Alias name is required to create an alias
My solution for now is to use two different SAM files, but in this project we plan to have from 40 to 60 lambda functions and can be hard to maitain.
angustohrallegrinski, mcintyre94, eddiecho, 0x4a616e, mariaines and 5 more