title: How to ssh into EC2 instance from lambda function
body: <p>I'm trying to write my first Python code in Lambda function that will check whether i'm able to SSH (port 22) in to an EC2 instance.</p>
  
  <p>I have created an EC2 instance with Security Group 22 CidrIP my public IP
   then, created a Lambda function with python 3.8 as runtime in the same account</p>
  
  <p>Now, through code i,m trying to SSH into EC2 by passing <code>EC2 Public IP</code>, <code>Username</code>, <code>Key pair</code></p>
  
  <p>and execute one command, example: <code>sudo su</code></p>
  
  <p>Question:</p>
  
  <ol>
  <li>Where should i place my keypair?</li>
  <li>What is the code to SSH in to EC2 from lambda funtion?</li>
  </ol>