Skip to content

Commit c5b1df8

Browse files
committed
chore: fix canary deployment
1 parent c5d2669 commit c5b1df8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

layer/layer/canary_stack.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ def __init__(
2525
) -> None:
2626
super().__init__(scope, construct_id, **kwargs)
2727

28+
deploy_stage = CfnParameter(
29+
self, "DeployStage", description="Deployment stage for canary"
30+
).value_as_string
31+
2832
layer_arn = StringParameter.from_string_parameter_attributes(
2933
self, "LayerVersionArnParam", parameter_name=ssm_paramter_layer_arn
3034
).string_value
@@ -34,6 +38,7 @@ def __init__(
3438
layer_arn=layer_arn,
3539
powertools_version=powertools_version,
3640
architecture=Architecture.X86_64,
41+
stage=deploy_stage,
3742
)
3843

3944
layer_arm64_arn = StringParameter.from_string_parameter_attributes(
@@ -47,6 +52,7 @@ def __init__(
4752
layer_arn=layer_arm64_arn,
4853
powertools_version=powertools_version,
4954
architecture=Architecture.ARM_64,
55+
stage=deploy_stage,
5056
)
5157

5258

@@ -58,15 +64,13 @@ def __init__(
5864
layer_arn: str,
5965
powertools_version: str,
6066
architecture: Architecture,
67+
stage: str,
6168
):
6269
super().__init__(scope, construct_id)
6370

6471
layer = LayerVersion.from_layer_version_arn(
6572
self, "PowertoolsLayer", layer_version_arn=layer_arn
6673
)
67-
deploy_stage = CfnParameter(
68-
self, "DeployStage", description="Deployment stage for canary"
69-
).value_as_string
7074

7175
execution_role = Role(
7276
self,
@@ -102,7 +106,7 @@ def __init__(
102106
"POWERTOOLS_VERSION": powertools_version,
103107
"POWERTOOLS_LAYER_ARN": layer_arn,
104108
"VERSION_TRACKING_EVENT_BUS_ARN": VERSION_TRACKING_EVENT_BUS_ARN,
105-
"LAYER_PIPELINE_STAGE": deploy_stage,
109+
"LAYER_PIPELINE_STAGE": stage,
106110
},
107111
)
108112

0 commit comments

Comments
 (0)