0

I just got onboarded to a project and I need to access the current EC2 instances but it appears the previous developer didn't grant anyone on the team access to the running instances.

The other developer that created an IAM user for me couldn't even access those instances.

We can see running instances, check the Inbound rules but no one on the team could ssh into those running instances.

Is there a way to access this instances as a admin user?

Phemi
  • 33
  • 1
  • 1
  • 9
  • can you check the iam user created for you corresponds to the account under which ec2 instance was created? if yes ca you check that I am user has amdmin access policy attached to it? – Jatin Mehrotra Apr 19 '21 at 09:59
  • No, generally not. Your ssh keys need to be "installed" on the machine and if they were not originally added and nobody has access to the machine (to add them now) you are out of luck. Note that there is no such thing as an "admin user" in terms of ec2, the IAM permissions a user has do no matter, either your public key is on the machine or it is not. – luk2302 Apr 19 '21 at 10:02
  • @JatinMehrotra why check any IAM permissions, they do not matter in this situation!? – luk2302 Apr 19 '21 at 10:06
  • true @luk2302 my bad :) – Jatin Mehrotra Apr 19 '21 at 11:39
  • @luk2302 Wow!! Even organization owner can't access it ?? I guess I have to create a new dev & prod environment then. – Phemi Apr 19 '21 at 16:37
  • Yes, nobody can access it unless you have the ssh keys (or some other way) set up. It is just a regular linux machine that basically has no longer anything to do with AWS / IAM. You can only modify the logical ec2 resource, terminate the machine, etc. but you cannot interact with the actual machine itself. – luk2302 Apr 20 '21 at 12:04
  • Does this answer your question? [Change key pair for ec2 instance](https://stackoverflow.com/questions/7881469/change-key-pair-for-ec2-instance) – luk2302 Apr 20 '21 at 12:15

0 Answers0