The guide will help to understand how to get an account for AWS and then get access to Cloud9 Editor. Once you have the access to Cloud9 Editor then you can start configuring the environment to write and run Ruby Apps.
You can learn more about AWS Cloud9 Editor from here.
Step 1: Create an AWS Account
- Goto to this URL: https://aws.amazon.com/cloud9/
- Click on “Create an AWS Account” Button
Provide all the Login details then Click “Continue” button
Complete the Registration by providing all your personal details. It will ask you to enter your credit card details do not worry we get 12 months free tier access so you won’t be charged! You can cancel the subscription anytime.
Once your registration is completed then next step is to Sign in to the Console.
Once you click on “Sign In to the Console“. Login in to the account with the gmail ID that you have entered during registration.
Enter the password and Click on the Sign in button.
Congratulations! You have successfully created an account with AWS. Now verify your account ID and Location of you cloud server on the Top right corner as highlighted in the image below.
Now search for Cloud9 in the search box. This will show the Cloud9 option please click on it.
Once you click on Cloud9 then it will take you to the Cloud9 AWS Home Page. You can start working with Cloud9 from here.
Make sure you are login with your correct ID and AWS Location selected is nearest to your region.
Step 2: Create an Group, User and Attach Policy
Why do we need to create a user as we have already have access to AWS Console and Cloud9?
Well, it is good practice that you maintain the root account simple and then create sub users to create different applications under each user. This way you can share your work with other developers and still restrict the access with the root user.
What is Root User?
The ID that you have used above to register and login into AWS Console is Root User. This is like an Admin. All the other user we will create below are like sub users that we can give the permission by this root user.
Lets create an User with our Root account.
Here is the complete guide from AWS on this setup.
Follow this steps to create the Groups, User and then attach Cloud9 Policy to the User.
To go back to Home Page of AWS click on the AWS Logo on left top corner.
Then Search for “IAM“. Select the IAM and Click on it.
Click on Groups and Then click on Create New Groups:
Step 1: Create the Group name
Step 2: Just Press Next without selecting any Policy
Step 3: Review your settings and Press “Create Group”
Your Group should now looks like this:
Once you have created the groups now you need to create the Users. Click on Users from left panel. Then Click on Add User.
Step 1: Provide the username and following the settings as below:
Step 2: Add the user to the groups that we have just created.
Step 3: Review the Settings
Final Step: Take note of the AWS Management Console URL and Click on the Close Button.
Now we need to attach the Cloud9 Access to the user by attaching the policy to the user.
Click on Groups from the Left Panel and select Permissions and Click on Attach Policy button
Once the Policy page comes up then Select the AWSCloud9Administrator policy and check the checkbox then click on Attach Policy Button
Review the Policy from the Groups:
Summary of the Steps:
- Create the Groups
- Create the Users
- Attach Users to the Groups
- Attach the Cloud9 Admin Policy to the Groups
Now the user rpcloud9 that we have created has access to cloud9 application. Lets logout and login again with new the user we have created.
Step 3: Login with New User in AWS Console
Logout from Root User by Clicking on Sign in to a different account
We now need to login using our new user credentials that we have created above.
Login with new user:
Once you are login into the AWS Cloud using the new user that we have just created above then search for Cloud9 to open the Cloud9 Home Page.
Step 4: Create the Environment in Cloud9
Environment is like a your development, qa or production environments. You must create the environment first in order to use the editor.
Click on Create new Environment Button from the Cloud9 Home Page. Make sure you are logged in with your User account (Not Root)
Step 1: Create the Name of the Environment
Step 2: Create the FREE instance for Educational Purpose. Stop the server after 30 mins if not used. You can change that settings as you like. Click on Next Step.
Step 3: Review the settings and Click on Create the Environment
Wait for few minutes and your new Environment will be loaded like this:
Step 4: Install Ruby
Once you are in the Cloud9 Editor then first thing that you need to do is to Update the OS and Install the Ruby.
Step 1: Run the Update command to get the latest security patches.
sudo yum -y update
Step 2: Install the Ruby
sudo yum -y install ruby
Step 3: Verify the Ruby using IRB Console
Congratulations you have now access to Cloud9 Editor with Ruby properly configured. You can start creating the project and run the ruby code from this editor.
Hope you have enjoyed the guide. If you have any issues during installation or need help. Then please feel free to comment below or drop us email at firstname.lastname@example.org