ssh into AWS Batch jobs

1.8k views Asked by At

I would like to communicate with AWS Batch jobs from a local R process in the same way that Davis Vaughn demonstrated for EC2 at https://gist.github.com/DavisVaughan/865d95cf0101c24df27b37f4047dd2e5. The AWS Batch documentation describes how to set up a key pair and security group for batch jobs. However, I could not find detailed instructions about how to find the IP address of a job's instance or what user name I need. The IP address in particular is not available in the console when I run the job, and aws batch describe-jobs --jobs prints out an empty "jobs": [] JSON string. Where do I find the information I need to ssh into a job's instance? (In my use case, I would prefer the IP address instead of the host name.)

1

There are 1 answers

2
notKnotTheory On

Posting here in case this helps someone. The instance should show up under "Running instances" in your ec2 console. You should be able to use the public ip address specified there. Make sure you configured your batch job to use your ec2 key pair and the correct user name (ec2-user for amazon linux 2). eg. ssh -i "your_keypair.pem" [email protected].