
Remote development setup using Amazon Q Developer in VS Code
With Amazon Q developer you can easily create CloudFormation templates for remote development.
Erik Cordsen
Amazon Employee
Published Apr 11, 2025
Remote development environments can significantly enhance your workflow by providing flexible, scalable resources that aren't constrained by your local machine. In this article, I'll share how using VS Code with Amazon EC2 has transformed my development process and guide you through setting up your own remote environment using Amazon Q Developer.
Remote development with VS Code and Amazon EC2 has become my secret sauce for rapid prototyping and experimentation. It started when I was working on a recent project that required the use of Node.js dependencies and containers that were difficult to install on my local machine due to disk size limitations. After losing a full day to setup issues, I turned to a remote development environment and was up and running in under an hour. This simple shift not only solved my immediate problems but transformed how I'll approach development projects going forward.
Remote development environments can offer several advantages:
- Collaboration Across Locations: Team members can work together seamlessly, regardless of their physical location.
- Access to a Clean Environment: Target a specific OS build and install just the dependencies you need without conflicts.
- Scalability: Adjust computational power, storage, and other resources as needed.
- Security: Implement enhanced security measures in a controlled remote environment.
- Disaster Recovery: Ensure continuity of work in case of local system failures.
- Learning and Training: Provide students with access to development tools without requiring on-campus presence.
- Easy Onboarding: New team members can quickly get up to speed without complex local configurations.
In this article, I'll show you how to use Amazon Q Developer to quickly set up a remote development environment in your AWS account.
- An AWS account
- The AWS CLI configured for your machine
- An Amazon Q Developer account
- VS Code installed with the following plugins
- Review and optionally clone the Amazon Q Developer Cookbook GitHub repository.
- Identify an Amazon VPC and Subnet to launch your remote development server into. For this use case you will be using AWS Systems Manager Agent (SSM Agent) to connect to the machine. You will not need to open any inbound ports to your dev server.
- If you want to create a new VPC for this use case, follow the instructions in the folder dev-vpc-with-private-subnet.
- Look in the folder remote-dev-server-without-ssh:
- From
README.md
, Copy the first prompt into a local text editor. Review and edit the file for your use case. - Adjust the name of the VPC from
dev-vpc
to the name of the VPC you plan to deploy this into. - If you are running on Windows, you will need to make the necessary adjustments for your environment as outlined in the
README
. - In VS Code, open Amazon Q Developer by selecting the icon on the plugins menu.

- In a new chat window, start a developer session by typing
/dev
. - Paste your prompt into the chat dialog and press your
enter
key or choose the send arrow. - Amazon Q Developer will take a few minutes to generate your code. When it's ready, you will have a chance to review and ask for changes if needed.
- When satisfied, choose "Accept all changes".

- Inspect the generated files and make any necessary adjustments to match your environment.
- Review the generated
INSTRUCTIONS.md
file by right-clicking on the file in the folder menu and selectingOpen Preview
. - To deploy the CloudFormation stack, follow the instructions created.
- From
README.md
, copy the second prompt into a local text editor. Review and edit the file for your use case. - In VS Code, choose the Remote extension. Next to SSH, select the gear icon. This will provide you with a dropdown list of config files to edit. Choose the most appropriate one, usually the first option.

- Add the appropriate configuration for your system
For Mac/Linux environments
For Windows environments
- Save your configuration.
- You will see the new dev environment appear in the list of available instances in your remote connection list.

- Choose the new instance and connect by clicking one of the icons.
Large Language Models such as those used in Amazon Q Developer are nondeterministic. You may get different results from Amazon Q Developer across different executions with the same prompt. Always inspect the generated code before executing it to ensure you understand what is happening. Amazon Q Developer can help with explaining and troubleshooting code.
You are now up and running with a remote development environment. This instance will only have permissions to AWS resources that you explicitly provide. If you need access to additional AWS resources, you can use the same credentials process you use for local development or modify the EC2 instance profile as needed to fit your use case.
This approach to development not only solves common local environment limitations but also provides a consistent, scalable workspace that can grow with your project's needs. Give it a try for your next development project and experience the benefits of cloud-powered development firsthand.
Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.