官术网_书友最值得收藏!

Method 2 – Cloud9 editor

Amazon recently acquired Cloud9, an online development platform. It runs a very basic version of Ubuntu that is integrated with the rest of the AWS platform.

Search for Cloud9 in the AWS Console, go to the page, and select Create environment. From here you give your environment a name and go to the next step.

Here you get to choose what you want to run this environment on. The great thing is that t2.micro is free-tier-eligible, so you can use this method without getting charged anything if you're on the free tier. I’ve never needed anything more powerful than a t2.micro.

Complete the setup process and you’ll end up in your new Cloud9 environment!

The cool thing about this is that you have access to all of your Lambda functions from inside your Cloud9 environment. Click AWS Resources and under Remote Functions, you'll find all of your functions. Click on the Lambda function you want to edit and then hit the download icon above to import it into your environment:

Accessing remote Lambdas

Once that's done, it'll just be like you're working on it locally.

Once you’re finished, just select the function you’ve been working on from the local list and hit the upload button. Within a few seconds, it’ll be live with all your changes.

The advantages:

  • Again, this is all remote so you don’t need to worry about forgetting to commit your work or saving it to a memory stick if you work on multiple machines.
  • Accessing your functions and reuploading them is super easy. This is by far the best bit about this method.
  • You now have an integrated terminal, allowing you to install npm packages and do everything else you want to do using the terminal.

The disadvantages:

  • It still has the same stability issues that the Lambda Console editor has. I’ve had multiple occasions where I’ve tried to save the function but couldn’t, and have had to copy to local, refresh, and recopy to Cloud 9. This becomes very annoying very quickly.
  • You need internet access to work on your Lambdas.

主站蜘蛛池模板: 鹤壁市| 张家口市| 基隆市| 陇西县| 洪洞县| 大丰市| 怀宁县| 黔东| 巴林左旗| 满城县| 通州区| 鲁甸县| 云和县| 辛集市| 永州市| 台州市| 石狮市| 揭阳市| 阜宁县| 仁布县| 永善县| 辽中县| 岚皋县| 靖安县| 兰坪| 潢川县| 泸定县| 瑞安市| 临沧市| 邢台市| 万州区| 尼勒克县| 通州市| 文昌市| 富宁县| 博野县| 宝清县| 罗定市| 永平县| 伊宁市| 广宗县|