DEV Community

Duc Tran (Sam)
Duc Tran (Sam)

Posted on

CODE ANYWHERE – NEW CLOUD IDE

1. Introduction
As you all know, since 2024, AWS Cloud9, formerly a popular web-based IDE, is no longer available to new customers, and new features are not being introduced. Therefore, finding a solution that can quickly deploy an IDE to serve development needs is very important. Today, I want to introduce you to an alternative to Cloud9 called Codeanywhere. This is a cross-platform cloud integrated development environment created by Codeanywhere, Inc. Codeanywhere enables users to write, edit, collaborate, and run web development projects from a web browser or mobile device. Codeanywhere is written in JavaScript. In this blog post, I will provide an example of using Codeanywhere as an IDE for coding Terraform to deploy resources on AWS.

2. Prerequisite
To start using it, you need to visit the CodeAnywhere website and log in with an account such as Google, GitHub, GitLab, or Bitbucket.

Image description

After logging into CodeAnywhere, proceed to install the AWS CLI by following these instructions: Installing or updating to the latest version of the AWS CLI - AWS Command Line Interface

Image description

3. Here's how to provision AWS resource with Terraform in CodeAnywhere

3.1 Create IAM User for CLI
Go to IAM, create an IAM User with Administrator permissions

Image description

After creating the user, go to the Security Credentials section, select CLI to create credentials for CLI access

Image description

After creating the credentials, use the Access Key and Secret Key just created to log in on the CLI

Image description

3.2 Install Terraform
Access the HashiCorp Terraform installation guide page to install Terraform CLI
After installing Terraform on CodeAnywhere, verify the installation.

Image description

3.3 Provision AWS resource with Terraform
In this section, I will use a Terraform template to quickly deploy a VPC based on the following architecture:

Image description

Clone my sample Terraform template from Github repository:
After cloning, execute the cd command to navigate into the directory of the source code and run the ls command to view the files in the directory.

Image description

Run terraform init to initialize Terraform.

Image description

If the initialization process does not report any errors, proceed to run terraform plan to check the resources that the Terraform template will provision.

Image description

Image description

After confirming the resources to be provisioned by Terraform in the terraform plan step, proceed to officially provision them on AWS using the command terraform apply.

Image description

Image description

After the apply is complete, go to the AWS Console to check the deployed resources.

Image description

4. Conclusion
Finally, through this article, you have seen how to utilize CodeAnywhere as a Cloud IDE to quickly support your development tasks. I hope this article has provided you with useful knowledge and a Cloud IDE solution to replace Cloud9.

Top comments (0)