Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS console gui unresponsive when editing Session Manager config #26

Open
sergeisourcepoint opened this issue Jan 3, 2023 · 3 comments

Comments

@sergeisourcepoint
Copy link

sergeisourcepoint commented Jan 3, 2023

Issue:

  • AWS console gui unresponsive when editing Session Manager config

Steps:

  • apply config using terraform module
  • in AWS Console: [AWS Systems Manager] -> [Session Manager] -> [Preferences] -> Click "Edit"
  • get grey screen

Requires explicit idleSessionTimeout setting and no-quote for true/false triggers:

FIX:

--- a/main.tf
+++ b/main.tf
@@ -36,10 +36,11 @@ resource "aws_ssm_document" "session_manager_prefs" {
     sessionType   = "Standard_Stream"
     inputs = {
       s3BucketName                = var.enable_log_to_s3 ? aws_s3_bucket.session_logs_bucket.id : ""
-      s3EncryptionEnabled         = var.enable_log_to_s3 ? "true" : "false"
+      s3EncryptionEnabled         = var.enable_log_to_s3 ? true : false
       cloudWatchLogGroupName      = var.enable_log_to_cloudwatch ? aws_cloudwatch_log_group.session_manager_log_group.name : ""
-      cloudWatchEncryptionEnabled = var.enable_log_to_cloudwatch ? "true" : "false"
+      cloudWatchEncryptionEnabled = var.enable_log_to_cloudwatch ? true : false
       kmsKeyId                    = aws_kms_key.ssmkey.key_id
+      idleSessionTimeout          = "20"
       shellProfile = {
         linux   = var.linux_shell_profile == "" ? var.linux_shell_profile : ""
         windows = var.windows_shell_profile == "" ? var.windows_shell_profile : ""
@kylelee24
Copy link

Confirming issue and steps to fix. But just to provide more detail:

  • idleSessionTimeout expects a string vs. number.
  • The condition on the shellProfile.linux and shellProfile.windows are backwards which results in the value to always be "". The correct code should be:
      shellProfile = {
        linux   = var.linux_shell_profile == "" ? "" : var.linux_shell_profile
        windows = var.windows_shell_profile == "" ? "" : var.windows_shell_profile
      }

NOTE: I found other bugs in this module as well so use with caution.

@r1ddl3
Copy link

r1ddl3 commented Mar 1, 2023

Looks like this is fixed in a submitted PR (#21). Any chance we can have it merged and a new version released so we can start using it please?

@r1ddl3
Copy link

r1ddl3 commented Mar 20, 2023

This still hasn't been approved/merged. Pretty, pretty please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants