Adding Condition to Lambda by overriding AWS CloudFormation resource #12329
Unanswered
amanangira
asked this question in
Q&A
Replies: 1 comment
-
Upon tweaking the serverless.yaml configuration to resources:
- ${file(resources/cognito-user-permission.yml)}
- ${file(resources/conditions.yml)}
- extensions:
SyncDashschedulerLambdaFunction:
Condition: CreateProdResources
I got this error
whereas the following works fine resources:
- ${file(resources/cognito-user-permission.yml)}
- ${file(resources/conditions.yml)}
- extensions:
SyncDashschedulerLogGroup:
Properties:
RetentionInDays: '30' |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I want to conditionally enable/disable deployment of a lambda function based on an AWS
Condition
. For this I am trying to leverage AWS CloudFormation override logic explained here. Although, I am facing the following errorI am certain that I am making a syntax error and this is possible to achieve. Since Condition is already documented as a valid resource attribute in the documentation.
Here is the relevant excerpt from my serverless.yml
conditions.yml
Note -- I have redacted part of the name from function name due to project's privacy.
Beta Was this translation helpful? Give feedback.
All reactions