Learn AWS Cloud9 and test an application
Learn AWS Cloud9 console to create and then open an AWS Cloud9 development environment.
Learn to use the AWS Cloud9 IDE to create and test an application.
Cloud9 operates in some specific regions for now. So, we have to switch to one of those operative Regions.
In AWS Console, top blue bar, from Region drop down, select US East (Ohio) us-east-2.
Go to Cloud9 Service. Click on Create Environment.
Provide the following configuration:
Environment Name: MyCloud9
Description: Cloud9 IDE for CloudPlusPlus Tutorial
Go to Next Step.
Confirm the following list of default selected choices:
Environment type: Create a new EC2 instance for environment (Direct access)
Instance type: t2.micro (1 GiB RAM + 1 vCPU)
Platform: Amazon Linux 2 (recommended)
Proceed to Next Step. Review and click on Create environment.
You will have the Cloud9 IDE ready in some time. A window as below is visible.
In the bottom part of the screen, a Terminal Window is visible. If not go to the Window option in Menu Bar of Cloud9 IDE and click on New Terminal.
Type the following command to check if g++ is installed. g++ --version
It will give the g++ installed version.
If g++ isn't installed, run the following command.
sudo yum groupinstall "Development Tools"
Run g++ --version again to confirm that the compiler has been installed.
Now go to File -> New File.
Type in the following code:
using namespace std;
int main(int argc, char* argv)
cout<<"Hello World!"<<endl; cout<<"The sum 2 and
3 is 5"<<endl; int sum; int a = stoi(argv); int b
= stoi(argv); sum = int(a+b); cout<<"The sum of
"<<a<<" and "<<b<<" is : "<<sum;
Save this file (Ctrl+S) by name of cloudpp.cpp.
In Menu Bar click on Run -> Run Configurations -> New Run Configuration.
On the [New] - Stopped tab, enter cloudpp.cpp 5 6 for Command. In the code, 5 represents argv, and 6 represents argv.
The output will be visible in the window.
Thus, we have successfully created a basic Cloud9 IDE and used it to run a CPP code.
If you no longer need the IDE, you may delete it.
In the top side of screen, click on the Cloud9 logo.
Further Click on Go To Your Dashboard.
In the Cloud9 Dashboard, select your IDE and click on Delete. Type “Delete” in the next screen to confirm deletion.
Note: Switch back to your usual operating Region.
Was this document helpful? How can we make this document better? Please provide your insights. You can download PDF version for reference.
We provide the best AWS training from Pune, India.
For aws certification contact us now.