-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
area/intrinsicsRef, If, Sub, GetAtt, ...Ref, If, Sub, GetAtt, ...area/resource/functionmaintainer/need-response
Description
I have a SAM template with Parameters, API, and Lambda, and I have three stacks with "Stage" parameter set as "dev-user1", "alpha", or "beta". Now, I am trying to update my lambda to support traffic shifting based on what stack it is as follows:
Conditions:
IsBetaStage:
Fn::Equals: [Ref: Stage, beta]
IsServiceStage:
Fn::Or: ["Fn::Equals": [Ref: Stage, alpha], Condition: IsBetaStage]
Resources:
LambdaFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: "LambdaFunction"
Handler: 'com.company.lambda.LambdaHandler::handleRequest'
Runtime: java8
Timeout: 30
Tracing: Active
AutoPublishAlias: live
DeploymentPreference:
Enabled: IsServiceStage
Type:
Fn::If: [IsBetaStage, Linear10PercentEvery10Minutes, AllAtOnce]
Alarms:
- { Ref: IncreasedFaults }
- { Ref: IncreasedLatency }
According to the template, "Enabled" should result to false in stack with "Stage" parameter set to "dev-user1" and true in every other stack, and hence there should be no traffic shifting in this stack. But I am observing the opposite of this, i.e, I am seeing traffic shifting in the stack with "Stage" parameter set to "dev-user1"
ts33, senior88oqz, fredrik-mile-wcar and james-yun
Metadata
Metadata
Assignees
Labels
area/intrinsicsRef, If, Sub, GetAtt, ...Ref, If, Sub, GetAtt, ...area/resource/functionmaintainer/need-response