@@ -2302,6 +2302,9 @@ def override_keys(keys_to_override, install_properties):
2302
2302
fsx = session .client (
2303
2303
"fsx" , region_name = install_parameters ["region" ], config = boto_extra_config
2304
2304
)
2305
+ ssm = session .client (
2306
+ "ssm" , region_name = install_parameters ["region" ], config = boto_extra_config
2307
+ )
2305
2308
2306
2309
cloudformation = session .client (
2307
2310
"cloudformation" ,
@@ -2481,11 +2484,35 @@ def override_keys(keys_to_override, install_properties):
2481
2484
install_parameters ["cluster_id" ],
2482
2485
)
2483
2486
2487
+ # Temporarily disable SSM Throughput if needed (https://docs.aws.amazon.com/systems-manager/latest/userguide/parameter-store-throughput.html)
2488
+ # Settings will be re-disabled if needed post deployment
2489
+ disable_ssm_high_throughput_post_install = False
2490
+
2491
+ _check_ssm_high_throughput = ssm .get_service_setting (
2492
+ SettingId = "/ssm/parameter-store/high-throughput-enabled"
2493
+ )
2494
+
2495
+ if _check_ssm_high_throughput .get ("ServiceSetting" ).get ("SettingValue" ) == "false" :
2496
+ logger .warning ("Temporarily enabling /ssm/parameter-store/high-throughput-enabled for SOCA deployment" )
2497
+ ssm .update_service_setting (
2498
+ SettingId = "/ssm/parameter-store/high-throughput-enabled" ,
2499
+ SettingValue = "true"
2500
+ )
2501
+ disable_ssm_high_throughput_post_install = True
2502
+
2484
2503
# Then launch the actual SOCA installer
2485
2504
logger .info ("\n ====== Deploying SOCA ======\n " )
2486
2505
launch_installer = os .system (cmd ) # nosec
2487
2506
2488
2507
if cdk_cmd == "deploy" :
2508
+ # Optional - Re-enable SSM default high-throughput settings
2509
+ if disable_ssm_high_throughput_post_install :
2510
+ logger .warning (
2511
+ "Restoring /ssm/parameter-store/high-throughput-enabled to its previous value post-deployment" )
2512
+ ssm .update_service_setting (
2513
+ SettingId = "/ssm/parameter-store/high-throughput-enabled" ,
2514
+ SettingValue = "false" )
2515
+
2489
2516
if int (launch_installer ) == 0 :
2490
2517
# SOCA is installed. We will now wait until SOCA is fully configured (when the ELB returns HTTP 200)
2491
2518
logger .info (f"[bold green]SOCA was installed successfully![/bold green]" )
0 commit comments