@@ -144,7 +144,7 @@ def __init__(
144144 # This is a logging bucket.
145145 access_logs_bucket .node .default_child .cfn_options .metadata = {
146146 "cfn_nag" : suppress_s3_access_policy (),
147- "guard" : suppress_cfnguard_rules ([' S3_BUCKET_NO_PUBLIC_RW_ACL' ]),
147+ "guard" : suppress_cfnguard_rules ([" S3_BUCKET_NO_PUBLIC_RW_ACL" ]),
148148 }
149149
150150 # Import user provide S3 bucket, if any. s3.Bucket.from_bucket_arn is used instead of
@@ -182,8 +182,8 @@ def __init__(
182182
183183 # add cfn-guard suppressions
184184 assets_bucket .node .default_child .cfn_options .metadata = {
185- "guard" : suppress_cfnguard_rules ([' S3_BUCKET_NO_PUBLIC_RW_ACL' ]),
186- }
185+ "guard" : suppress_cfnguard_rules ([" S3_BUCKET_NO_PUBLIC_RW_ACL" ]),
186+ }
187187
188188 # Create the resource if create_new_bucket condition is True
189189 Aspects .of (assets_bucket ).add (ConditionalResources (create_new_bucket ))
@@ -209,8 +209,8 @@ def __init__(
209209
210210 # add cfn-guard suppressions
211211 blueprint_repository_bucket .node .default_child .cfn_options .metadata = {
212- "guard" : suppress_cfnguard_rules ([' S3_BUCKET_NO_PUBLIC_RW_ACL' ]),
213- }
212+ "guard" : suppress_cfnguard_rules ([" S3_BUCKET_NO_PUBLIC_RW_ACL" ]),
213+ }
214214
215215 # add override for access logs bucket
216216 access_logs_bucket .add_to_resource_policy (
@@ -260,9 +260,9 @@ def __init__(
260260 "MLOpsNotificationsTopic" ,
261261 )
262262 )
263- mlops_notifications_topic .node .default_child .cfn_options .metadata = (
264- { "cfn_nag" : suppress_sns () }
265- )
263+ mlops_notifications_topic .node .default_child .cfn_options .metadata = {
264+ "cfn_nag" : suppress_sns ()
265+ }
266266
267267 mlops_notifications_topic .add_subscription (
268268 subscriptions .EmailSubscription (
@@ -316,6 +316,9 @@ def __init__(
316316 self ,
317317 "CustomResourceCopyAssets" ,
318318 service_token = custom_resource_lambda_fn .function_arn ,
319+ properties = {
320+ "blueprint_bucket" : blueprint_repository_bucket .bucket_name ,
321+ },
319322 )
320323 custom_resource .node .add_dependency (blueprint_repository_bucket )
321324 # IAM policies setup ###
@@ -354,7 +357,7 @@ def __init__(
354357 "code" : lambda_ .Code .from_asset ("../lambdas/pipeline_orchestration" ),
355358 "layers" : [sm_layer ],
356359 "timeout" : Duration .minutes (10 ),
357- "memory_size" : 512
360+ "memory_size" : 512 ,
358361 },
359362 api_gateway_props = {
360363 "defaultMethodOptions" : {
@@ -367,19 +370,19 @@ def __init__(
367370 )
368371
369372 # add lambda suppressions
370- provisioner_apigw_lambda .lambda_function .node .default_child .cfn_options .metadata = (
371- { "cfn_nag" : suppress_lambda_policies () }
372- )
373+ provisioner_apigw_lambda .lambda_function .node .default_child .cfn_options .metadata = {
374+ "cfn_nag" : suppress_lambda_policies ()
375+ }
373376
374377 # add API Gateway suppressions
375- provisioner_apigw_lambda .api_gateway .deployment_stage .node .default_child .cfn_options .metadata = (
376- { "guard" : suppress_cfnguard_rules (["API_GW_CACHE_ENABLED_AND_ENCRYPTED" ]) }
377- )
378+ provisioner_apigw_lambda .api_gateway .deployment_stage .node .default_child .cfn_options .metadata = {
379+ "guard" : suppress_cfnguard_rules (["API_GW_CACHE_ENABLED_AND_ENCRYPTED" ])
380+ }
378381
379382 # add CW role suppression
380- provisioner_apigw_lambda .api_gateway_cloud_watch_role .node .default_child .cfn_options .metadata = (
381- { "guard" : suppress_cfnguard_rules (["IAM_NO_INLINE_POLICY_CHECK" ]) }
382- )
383+ provisioner_apigw_lambda .api_gateway_cloud_watch_role .node .default_child .cfn_options .metadata = {
384+ "guard" : suppress_cfnguard_rules (["IAM_NO_INLINE_POLICY_CHECK" ])
385+ }
383386
384387 provision_resource = provisioner_apigw_lambda .api_gateway .root .add_resource (
385388 "provisionpipeline"
@@ -400,9 +403,9 @@ def __init__(
400403 )
401404
402405 # add role suppressions
403- provisioner_apigw_lambda .lambda_function .role .node .default_child .cfn_options .metadata = (
404- { "guard" : suppress_cfnguard_rules ([' IAM_NO_INLINE_POLICY_CHECK' ]) }
405- )
406+ provisioner_apigw_lambda .lambda_function .role .node .default_child .cfn_options .metadata = {
407+ "guard" : suppress_cfnguard_rules ([" IAM_NO_INLINE_POLICY_CHECK" ])
408+ }
406409
407410 # Environment variables setup
408411 provisioner_apigw_lambda .lambda_function .add_environment (
@@ -555,7 +558,7 @@ def __init__(
555558 },
556559 ]
557560 },
558- "guard" : suppress_cfnguard_rules ([' S3_BUCKET_NO_PUBLIC_RW_ACL' ])
561+ "guard" : suppress_cfnguard_rules ([" S3_BUCKET_NO_PUBLIC_RW_ACL" ]),
559562 }
560563
561564 # custom resource for operational metrics###
0 commit comments