LoginSignup
1
0

More than 5 years have passed since last update.

Amazon LinuxにServerless Frameworkをインストールする

Posted at

Node.jsのインストール

[ec2-user@ip-10-0-0-143 ~]$ sudo yum groupinstall 'Development tools' -y
[ec2-user@ip-10-0-0-143 ~]$ curl -O https://nodejs.org/dist/v6.9.1/node-v6.9.1.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 25.2M  100 25.2M    0     0  34.5M      0 --:--:-- --:--:-- --:--:-- 34.5M
[ec2-user@ip-10-0-0-143 ~]$ tar xvf node-v6.9.1.tar.gz
[ec2-user@ip-10-0-0-143 ~]$ cd node-v6.9.1
[ec2-user@ip-10-0-0-143 node-v6.9.1]$ ./configure --prefix=/usr/local
[ec2-user@ip-10-0-0-143 node-v6.9.1]$ make
[ec2-user@ip-10-0-0-143 node-v6.9.1]$ sudo make install
[ec2-user@ip-10-0-0-143 node-v6.9.1]$ node -v
v6.9.1
[ec2-user@ip-10-0-0-143 node-v6.9.1]$ npm -v
3.10.8
[ec2-user@ip-10-0-0-143 node-v6.9.1]$ cd ..
[ec2-user@ip-10-0-0-143 ~]$ rm node-v6.9.1.tar.gz

Serverless Frameworkのインストール

[ec2-user@ip-10-0-0-143 ~]$ sudo su -
[root@ip-10-0-0-143 ~]# npm install -g serverless
[root@ip-10-0-0-143 ~]# serverless

Commands
* Serverless documentation: http://docs.serverless.com
* You can run commands with "serverless" or the shortcut "sls"
* Pass "--help" after any <command> for contextual help

create ........................ Create new Serverless service
install ....................... Install a Serverless service from GitHub
deploy ........................ Deploy a Serverless service
deploy function ............... Deploy a single function from the service
deploy list ................... List deployed version of your Serverless Service
invoke ........................ Invoke a deployed function
invoke local .................. Invoke function locally
info .......................... Display information about the service
logs .......................... Output the logs of a deployed function
remove ........................ Remove Serverless service and all resources
rollback ...................... Rollback the Serverless service to a specific deployment
slstats ....................... Enable or disable stats

Plugins
Create, Deploy, Info, Install, Invoke, Logs, Package, Remove, Rollback, SlStats
[root@ip-10-0-0-143 ~]# serverless -v
1.2.1
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0