Posts

Ubuntu EC2 instance connect for Cli SSH with Azure-AD SSO or for traditional SSH access.

Image
                        SETTING-UP EC2 INSTANCE CONNECT FOR CLI SSH ACCESS UBUNTU There are different ways of gaining SSH access for EC2 instances here we will see SSH access for EC2 instance through Cli. This method best suits if you use Azure-AD SSO with AWS. Setting up EC2 instance connect: EC2 instance connect needs followings, 1. Amazon Linux 2 of any version  OR 2. Ubuntu 16.04 or later. For Ubuntu: First connect to your EC2 instance with Sudo access and become Sudo. then update and upgrade your instance sudo apt update -y && sudo apt upgrade -y sudo apt install ec2-instance-connect -y Now attach a policy like this to the IAM user in order to send the instance SSH key. Replace the AWS-ACCOUNTID with your ID. You can also customise based on your need like access to certain instances. This role gives access to all instances in your account. {     "Version": "2012-10-17",     "Statement": [         {             "Sid": "VisualEdit

Azure-AD integration with AWS for console and Cli access.

Image
                                                                AZURE-AD INTEGRATION WITH AWS FOR SEAMLESS CONSOLE                                                                AND  CLI ACCESS Hi folks in this documentation let us see how to integrate Azure-AD users with AWS for both console and CLI accesses. For SOC-2 type of audits it is recommended to provide AWS access to users without sharing the .PEM file of EC2 instances and also giving AWS access to users with Azure-AD is seamless and can be retained whenever the user relieved from the company. I would recommend Azure-AD SSO for AWS integration instead of going for AWS-SSO since with Azure-AD SSO we can use customised  roles and policies whereas with AWS SSO such customisation is not possible. AZURE-AD SSO with AWS: 1. In your Microsoft Azure login click on Azure Active Directory. 2. In the manage section select Entireprise application. 3. Then select New application. 4. Search for AWS. You can find AWS SSO application as in t