Deploying code-server (Visual Studio Code) on AWS Ubuntu EC2 server using AWS CloudFormation Template
This is the CloudFormation Template for creating an Ubuntu EC2 instance and deploy code-server in the browser. You can use VS Code any machine including your ipad, iphone, android mobile devices, computer, etc.
You will have to use an existing key pair
. If you don't have one already, create a new key pair after selecting your desired AWS Region.
Name your new stack. You must have an existing key pair
you have already created before.
Instance name will be the stack name you give. Please refer the CloudFormation Template of this project for the EC2 Instance properties/Tags.
CodeServer:
Type: AWS::EC2::Instance
Properties:
# Ubuntu
ImageId: ami-09e67e426f25ce0d7
InstanceType: t2.micro
KeyName: !Ref KeyPairName
IamInstanceProfile: !Ref CodeServerEC2Profile
SecurityGroupIds:
- !GetAtt CodeServerSecurityGroup.GroupId
Tags:
- Key: Name
Value: !Sub ${AWS::StackName}
- Key: server
Value: vscode
Click Next
to move all the way the last step Review
without making any other change
After stack creation is complete check your ec2 console for your vscode-server
Once your instance starts, you can simply navigate to the public IP address and get forwarded to a secure version of code-server, which will be proxied behind your GitHub account (the first one you log in with). Login to your GitHub account. For information on how this works, see code-server
Installing_extensions.mp4
Clone_repo_from_github.mp4
See the original code and more information for deploying on AWS
Some additional lines added to user data in this CloudFromation template which is slightly different than the original user data.
See the troubleshooting guide if you are unable to connect after some time.
Deploying code-server on various cloud platforms
Or, just use GitHub web-based editor without using any other tool except your web browser (Lightweight editing only)
The web-based editor introduces a lightweight editing experience that runs entirely in your browser.
You can open any GitHub repository in the web-based editor in either of the following ways:
- Press . while browsing any repository or pull request on GitHub.
- Change the URL from "github.com" to "github.dev".