- Newest
- Most votes
- Most comments
You would use Visual Studio Code to connect to your EC2. First you would have to Install the Remote SSH Extension in Visual Studio Code and then create a config file. Your config file would have to look like this:
# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host <name of EC2 instance>
HostName <Public IPv4 DNS>
User ec2-user
IdentityFile <where you stored your key pair in you computer>/<key pair name>.pem
An alternative option is to use Cloud9 for a fully managed development environment.
It appears from your response that you are using CloudShell, but CloudShell cannot launch Docker.
https://docs.aws.amazon.com/cloudshell/latest/userguide/vm-specs.html
Currently, the AWS CloudShell compute environment doesn't support Docker containers.
Are you accessing EC2 and executing commands?
First, access EC2 from your local PC via SSH or other means.
After that, Docker and other software must be installed.
Refer to the following instructions for SSH connection to EC2.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html
Relevant content
- AWS OFFICIALUpdated 10 months ago
- How do I monitor my transit gateway and Site-to-Site VPN on a transit gateway using Network Manager?AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 5 months ago
- AWS OFFICIALUpdated 2 years ago
@Riku - thanks for getting back to me and sorry for the late reply as it was after midnight in my time zone. Yes, I have Docker installed on my Mac and I have EC2 but unable to execute commands in CloudShell. Are you trying to say that I need to use the above method (the link you've provided) via my Mac Terminal?
Yes, connect to EC2 from your Mac. Then, after connecting to EC2, you need to execute "Step 4.1: Install Packages".
@Riku, thanks and sorry for late reply. After connecting to EC2 from my Mac, that part to Execute the all 4 Steps will be done on my Mac Terminal or in AWS CloudShell?
SSH is done from a Mac, so please operate from a Mac terminal.
@Riku, thanks but if operate from Mac Terminal. Will the dependencies install in the tutorial will link back to EC2? Also, in my Mac Terminal (I've followed the EC2 SSH Connection Instruction), I now have a new error, that is --> ssh: Could not resolve hostname enable: nodename nor servname provided, or not known.
Where can I get the nodename or servname from AWS?