I came to know about
Cloud9: A cloud IDE for writing, running, and debugging code when I started using
CodeStar: a tool that streamlines the usage of multiple aws services such as
i)
AWS CodeCommit - a fully-managed source control service that makes it easy for companies to host secure and highly scalable private Git repositories.
ii)
AWS CodeBuild - a fully managed build service that compiles source code, runs tests, and produces software packages that are ready to deploy
iii)
AWS CloudFormation - Model and provision all your cloud infrastructure resources
iv)
Amazon CloudWatch - a monitoring and management service built for developers, system operators, site reliability engineers (SRE), and IT managers.
v)
AWS Cloud9 - a cloud-based integrated development environment (IDE) that lets you write, run, and debug your code with just a browser.
The descriptions above were taken from respective AWS webpages.
You can check out some screenshots below on how to create a project using CodeStar. This is based of my experience of using Python for a web service to create lambdas and API Gateway endpoints.
How to create a project using CodeStar:
1) Select a project template
 |
AWS CodeStar Project templates |
2) Select a Git repo
 |
AWS CodeStar Git Repo |
3) Select an IDE
 |
AWS CodeStar IDE |
4) Set up AWS Cloud9 environment. I have been using t2.micro and it is sufficient for me. Note that free tier is only available for the first 12 months.
 |
AWS CodeStar Cloud9 EC2 instance types |
5) Now that the configuration is done, it will start preparing the resources.
 |
AWS Codestar console |
6) If you scroll down a little bit, you will see an application activity and a continuous deployment section.
Application activity indicates the activity of an API Gateway endpoint using Amazon CloudWatch, for example.
Continuous deployment section shows the process and status of building and deployment.
 |
AWS CodeStar Application Activity and Continuous Deployment |
7) To open up your Cloud9 IDE, go to IDE tab on the left. And, you will see a similar screen.
 |
AWS CodeStar Cloud9 IDE |
8) To let other team members access and configure for this project, you can grant them access on Team tab.
 |
AWS CodeStar Project Team |
9) This is how Cloud9 IDE looks like:
 |
AWS Cloud9 |
10) Cloud9 supports key bindings / enables shortcut keys! This is an important feature to speed up development.
 |
AWS Cloud9 Keybindings |
11) You can open up a terminal by clicking + button on the top of a page
 |
AWS Cloud9 New Terminal |
12) You can run your test on Cloud9 IDE by following the follow steps:
click AWS Resources on the right panel > expand local functions > expand your project name > right click or select a lambda function > run
 |
AWS Cloud9 Resources - run function locally |
13) In my Cloud9 IDE, you can see these 2 important files buildspec.yml and template.yml
buildspec.yml contains the commands to build the project
AWS SAM is important to build and deploy code successfully.
What is yml?
YAML is a human friendly data serialization standard for all programming languages.
14) When you run your lambda function locally, lambda-payloads.json file will be created. This file is where you have all your query parameters set.
You can get a template of the type of payloads that you expect on Lambda test section.
 |
AWS Cloud9 run code locally |
15) Now, you can start writing code and edit your yaml template to build and deploy your code.
On the hand, please check out my
Amazon Alexa post which I will keep updating after I try out with more Alexa functions. Thanks!
Thanks for reading!
Jun
Support me on Amazon
Comments
Post a Comment