For a while, I made a tool (OSS) called Lamvery that makes it easy to deploy and manage AWS Lambda, and [Introduced in Qiita](http: / /qiita.com/marcy-terui/items/1617ab4e20e3339d1930) I was allowed to do it, but although it has become quite convenient to use, it has recently appeared Apex. .com / apex / apex) has a very high degree of attention [^ 1] and I was jealous, so I decided to write a comparative article.
Click here for a description of Lamvery
.
http://qiita.com/marcy-terui/items/1617ab4e20e3339d1930
https://github.com/marcy-terui/lamvery/blob/master/README.md
ʻApex` can get a feel for it by looking at the wiki. https://github.com/apex/apex/wiki
One of them is my own work, so I'd like to be as fair as possible, but please take a look if you're on the Lamvery side. In addition, I will also post explanations and opinions as the author. For your information.
Also, Apex intends to grasp various things from the opposition, but it would be helpful if you could point out any mistakes.
Below is a comparison as of January 29, 2016.
item | Apex | Lamvery |
---|---|---|
Implementation language | Go | Python |
Installation method | Binary download | PyPi,rpm,deb |
Supported runtime(Lambda) | Go, Python, Node.js | Python, Node.js |
Managed | Project unit | Function unit |
Configuration file format | JSON | YAML + jinja2 |
It's a matter of taste.
Apex
Since the installation method is Go, it is binaryized for each dependency, and is ʻApexstrong just to download and put it? Lamvery You need to set up the
Python +
pipenvironment. From there, you can use
pip` to install all the dependencies with one command. [^ 2]
We also provide yum and deb packages that allow you to create a completely independent environment including Python for use in CI environments.
https://github.com/marcy-terui/lamvery#installation
Apex
ʻApex is characterized by supporting
Golang, which Lambda does not officially support. Besides, it seems that it corresponds to AltJS system such as Babel [^ 3] Lamvery
Lamvery does not intend to support
Gounless otherwise requested. [^ 4]
Node.js is experimental support for now as I am the
Python` main. [^ 4]
I think it's not too far away for the official to support Go
, but what about?
I wonder if everyone wants to use such an informal method ...?
Apex
ʻApexcan manage multiple Lambda Functions in one Project, and there are a configuration file applied to the Project and a configuration file applied to each Function. Lamvery
Lamverycan only be managed on a Function basis. This is where I am thinking about what to do in the future. However, since it is a Function unit, it is limited to Python, but if you install only the library used by that Function in the
virtaulenv [^ 5] virtual environment, it will be automatically collected in consideration of storage efficiency. And I try to upload it. This is because ʻApex
only uploads everything under a specific directory, so [Lambda source code capacity is limited](http://ijin.github.io/blog/2016/01/14/monitor -lambda-capacity /) Isn't it a big difference considering that? Only for Python. .. .. [^ 6]
Apex
It's just JSON
.
Lamvery
Although it is YAML
, it is covered with the template engine jinja2.
That is, it supports variable embedding and dynamic writing.
item | Apex | Lamvery |
---|---|---|
Deploy | ○ | ○ |
Rollback | △ | ○ |
Arbitrary Alias settings | ☓ | ○ |
Run(Invoke) | ○ | ○ |
Exclusion list | ○ | ○ |
Confidential information delivery | ○ | ◎ |
CloudWatch Events(Schedule execution) | ☓[^8] | ○ |
CloudWatch Logs(View execution log) | ○ | ○ |
CloudWatch Metrics(Startup time etc.) | ○ | ☓ [^7] |
Of the features in both, only the parts that have characteristic differences are listed.
Deploy & Rollback Lambda's special versioning specifications are easy to understand, so I think you should read it ↓ http://dev.classmethod.jp/cloud/aws/lambda-versioning/
Apex
Versioning [^ 9] is required. It is executed by setting Alias called current
at the time of deploy and replacing current
with the latest previous version at the time of rollback.
However, this ʻApex` method breaks down if Alias is replaced by something other than deploy and rollback. That's fine, but even if you repeat deploy and rollback twice, it will break (see below).
At the end, I want it to return to "2", but I know that it will fail, and it will return to "3". For the time being, there is an option to specify an arbitrary version at Rollback, but I think it is nonsense that humans have to remember the version number.
Lamvery
Due to the above problems, Lamvery
uses another method.
Simply put, when deploying, add another Alias to the previous version and roll back to it. This is to enable operations such as temporarily rewinding to the previous version two or more.
There is also a function to attach an arbitrary Alias, so you can use it in combination for flexible version control. If you want to use it as simply as Apex, you can just use Deploy and Rollback with versioning enabled. Versioning is required if you use Rollback, but you can turn it off in the config file if you don't. You can also set Alias to be set at the time of deployment. This is also a necessary option based on the Lambda capacity limit mentioned earlier. I think it is. You can turn it off for minor fixes and turn it on when you need it so you can roll back.
Apex It is possible to start one-shot and receive input one after another from standard input (Streaming) and execute synchronously continuously [^ 10]. Lamvery Only one-shot execution. Streaming wants to run asynchronously [^ 10] and support ClooodWatch Logs in a tail-like way.
Apex
Specify as an environment variable when deploying. It cannot be included in version control [^ 11].
Looking at the source and Wiki, it seems that Python does not support it ...?
Lamvery
You can use KMS to include encrypted confidential information in the configuration file for version control [^ 10].
~~ Currently, only Python is supported, but I would like to support Node.js in the near future. ~~
Node.js is also supported (2015.02.03)
So far, I think there are advantages and disadvantages overall.
However, I think that the rollback specifications and CloudWatch Events support are a big difference, so I would appreciate it if you could pay attention not only to ʻApex but also to
Lamvery`, considering that Japanese support is possible [^ 12]. :-) [^ 13]
https://github.com/marcy-terui/lamvery
[^ 1]: Number of stars on GitHub, Apex Japanese article and [Lamvery's Qiita article](http://qiita. com / marcy-terui / items / 1617ab4e20e3339d1930) Compare the number of magazines. .. ..
[^ 2]: pip
is gem
in Ruby and npm
in Node.js. If you install Python with pyenv
, it is included as standard, and if it is a Linux system, it is often installed from the default package manager.
[^ 3]: It supports by launching Go binary from Node.js as a child process and exchanging using standard input / output.
[^ 4]: I'm worried because there aren't many users. .. ..
[^ 5]: Python library that can create an independent Python execution environment that does not share libraries etc.
[^ 6]: Because I use it mainly in Python, I would like to respond if someone familiar with Node.js can just give me an idea.
[^ 7]: Coming soon
[^ 8]: Will it be supported? Under discussion at Issue
[^ 9]: publish
option for Lambda
Recommended Posts