Skip to content

Instantly share code, notes, and snippets.

@thapakazi
Created May 6, 2021 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thapakazi/1e99be86d9820064a8ee6c0225a83584 to your computer and use it in GitHub Desktop.
Save thapakazi/1e99be86d9820064a8ee6c0225a83584 to your computer and use it in GitHub Desktop.
Session Manager / Use and configuration

Session Manager - Simplified

  • Alternative login to your ec2 instances via session manager
    • Make sure you are using vm with session manager installed
    • Your instance is attached with a iam role that has following policy attached:
      • policy_arn = “arn:aws:iam::aws:policy/AmazonSSMManagedInstanceCore”
    • Get the instance id from aws and try login with aws-cli as:
      aws ssm start-session --target "i-1234567890abcdef0"
              

      You will get a error, like following:

      SessionManagerPlugin is not found. Please refer to SessionManager Documentation here: http://docs.aws.amazon.com/console/systems-manager/session-manager-plugin-not-found
              
    • Install the plugin first ;) https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html
      yay -S aws-session-manager-plugin
              

      and retry, you will be able to login.

      Starting session with SessionId: thapakazi-00xxx123
              

      Cheers!!

    • Todo:
      • upgrade easyssh to support login with ssm-agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment