@@ -25,6 +25,10 @@ def __init__(
25
25
) -> None :
26
26
super ().__init__ (scope , construct_id , ** kwargs )
27
27
28
+ deploy_stage = CfnParameter (
29
+ self , "DeployStage" , description = "Deployment stage for canary"
30
+ ).value_as_string
31
+
28
32
layer_arn = StringParameter .from_string_parameter_attributes (
29
33
self , "LayerVersionArnParam" , parameter_name = ssm_paramter_layer_arn
30
34
).string_value
@@ -34,6 +38,7 @@ def __init__(
34
38
layer_arn = layer_arn ,
35
39
powertools_version = powertools_version ,
36
40
architecture = Architecture .X86_64 ,
41
+ stage = deploy_stage ,
37
42
)
38
43
39
44
layer_arm64_arn = StringParameter .from_string_parameter_attributes (
@@ -47,6 +52,7 @@ def __init__(
47
52
layer_arn = layer_arm64_arn ,
48
53
powertools_version = powertools_version ,
49
54
architecture = Architecture .ARM_64 ,
55
+ stage = deploy_stage ,
50
56
)
51
57
52
58
@@ -58,15 +64,13 @@ def __init__(
58
64
layer_arn : str ,
59
65
powertools_version : str ,
60
66
architecture : Architecture ,
67
+ stage : str ,
61
68
):
62
69
super ().__init__ (scope , construct_id )
63
70
64
71
layer = LayerVersion .from_layer_version_arn (
65
72
self , "PowertoolsLayer" , layer_version_arn = layer_arn
66
73
)
67
- deploy_stage = CfnParameter (
68
- self , "DeployStage" , description = "Deployment stage for canary"
69
- ).value_as_string
70
74
71
75
execution_role = Role (
72
76
self ,
@@ -102,7 +106,7 @@ def __init__(
102
106
"POWERTOOLS_VERSION" : powertools_version ,
103
107
"POWERTOOLS_LAYER_ARN" : layer_arn ,
104
108
"VERSION_TRACKING_EVENT_BUS_ARN" : VERSION_TRACKING_EVENT_BUS_ARN ,
105
- "LAYER_PIPELINE_STAGE" : deploy_stage ,
109
+ "LAYER_PIPELINE_STAGE" : stage ,
106
110
},
107
111
)
108
112
0 commit comments