DEV Community

Cover image for Connecting to EC2 Instances using Azure AD Users
Bervianto Leo Pratama for AWS Community Builders

Posted on • Originally published at github.com

6

Connecting to EC2 Instances using Azure AD Users

Introduction

We will connect EC2 Instances using Session Manager. These steps are only for testing/evaluation purposes. Please use the least privileged permissions/roles.

Prerequisite

Configured Enterprise Application & Assigned Related IAM Role to Azure AD Users

Please refer to the main README.md.

Note:

Setting EC2 Instances to support Session Manager

Note:

Supported Tools

Steps

Configuration

  1. npm install -g aws-azure-login -> Install aws-azure-login
  2. aws configure --profile <target profile> -> Example: aws configure --profile aad, you only need to configure default region, if you want it.

    aws configure

  3. aws-azure-login --configure --profile <target-profile> -> Example: aws-azure-login --configure --profile aad

    aws azure login

    a. You only need to configure the tenant id, app id, and default session duration (recommend using 1 hour).

Connect to EC2 Instances using existing profile

  1. aws-azure-login --profile <target profile> -> Example aws-azure-login --profile <target profile>.

    azure login

    note: I use the default username, so I input the password only.

  2. aws ssm --region <target region> --profile <target profile> start-session --target <ec2-instance-id>. You don't need to set a region if your instance is the same as the default region.

    login

Note:

Key Resources


Source

Thank you

GIF Thanks

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

Best Practices for Running  Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK cover image

Best Practices for Running Container WordPress on AWS (ECS, EFS, RDS, ELB) using CDK

This post discusses the process of migrating a growing WordPress eShop business to AWS using AWS CDK for an easily scalable, high availability architecture. The detailed structure encompasses several pillars: Compute, Storage, Database, Cache, CDN, DNS, Security, and Backup.

Read full post

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay