{"id":10122,"date":"2021-06-21T11:32:52","date_gmt":"2021-06-21T02:32:52","guid":{"rendered":"https:\/\/www.gigas-jp.com\/appnews\/?p=10122"},"modified":"2021-06-21T11:49:17","modified_gmt":"2021-06-21T02:49:17","slug":"a-touch-to-serverless-framework-part-1","status":"publish","type":"post","link":"https:\/\/www.gigas-jp.com\/appnews\/archives\/10122","title":{"rendered":"A touch to serverless framework part 1"},"content":{"rendered":"\n<p>A few weeks ago, I wrote an <a href=\"\/appnews\/archives\/10042\">article<\/a> about serverless and today I will make a touch to serverless framework using node.js and AWS (Amazon web service). This is just a simple and getting started article how to use serverless framework. I will be using mac OS for the operating system.<\/p>\n\n\n\n<p>I will divided the parts because this article might be long as the article includes screenshots. So lets get started.<\/p>\n\n\n\n<p>First, we need to check the node version in your computer. Check with node &#8211; v in your computer. Then we will install the serverless framework using npm.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo npm install -g serverless     <\/code><\/pre>\n\n\n\n<p>We will get a result like this at the end of installation.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"391\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2021\/06\/sls-installtion-1024x391.png\" alt=\"\" class=\"wp-image-10123\" srcset=\"https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2021\/06\/sls-installtion-1024x391.png 1024w, https:\/\/www.gigas-jp.com\/appnews\/wp-content\/uploads\/sites\/4\/2021\/06\/sls-installtion.png 1566w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>You can test whether serverless is installed on your computer or not using <code>serverless<\/code> or <code>sls<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"888\" height=\"454\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2021\/06\/sls-help.png\" alt=\"\" class=\"wp-image-10124\" \/><\/figure>\n\n\n\n<p>Ok , now we need to create <a href=\"https:\/\/console.aws.amazon.com\/iam\">IAM<\/a> at Amazon console panel. Lets see the steps in below.<\/p>\n\n\n\n<p>Here is the IAM dashboard.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"426\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2021\/06\/image-9-1024x426.png\" alt=\"\" class=\"wp-image-10126\" \/><\/figure>\n\n\n\n<p>Then we will create a new IAM user to integrate with our serverless project.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"564\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2021\/06\/4.create-iam-1024x564.png\" alt=\"\" class=\"wp-image-10127\" \/><\/figure>\n\n\n\n<p>Add a username and mark the checkbox on programmatic access. Then go to next step for permission.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"564\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2021\/06\/5.aws-iam-policies-1024x564.png\" alt=\"\" class=\"wp-image-10128\" \/><figcaption><br><\/figcaption><\/figure>\n\n\n\n<p>We will grant the user for administrator access for now as we want to build services from serverless configuration later on.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"558\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2021\/06\/6.iam-success-1024x558.png\" alt=\"\" class=\"wp-image-10129\" \/><\/figure>\n\n\n\n<p>As a final step, we will get a new IAM user with access key and secret access key. We will use these keys to setup credentials in our serverless project. Lets create credentials as below<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>serverless config credentials --provider aws --key YOUR-ACCESS-KEY --secret YOUR-SECRET-ACCESS-KEY<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"552\" height=\"48\" src=\"\/appnews\/wp-content\/uploads\/sites\/4\/2021\/06\/image-10.png\" alt=\"\" class=\"wp-image-10131\" \/><\/figure>\n\n\n\n<p>This will be the correct response after hitting the above command and now we have successfully created credentials with IAM user.<\/p>\n\n\n\n<p>In the next week, I will be talking about creating a project and start deploying from our serverless project.<\/p>\n\n\n\n<p>Yuuma<\/p>\n<div class='wp_social_bookmarking_light'>\n            <div class=\"wsbl_google_plus_one\"><g:plusone size=\"medium\" annotation=\"none\" href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/10122\" ><\/g:plusone><\/div>\n            <div class=\"wsbl_hatena_button\"><a href=\"\/\/b.hatena.ne.jp\/entry\/https:\/\/www.gigas-jp.com\/appnews\/archives\/10122\" class=\"hatena-bookmark-button\" data-hatena-bookmark-title=\"A touch to serverless framework part 1\" data-hatena-bookmark-layout=\"standard\" title=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\"> <img src=\"\/\/b.hatena.ne.jp\/images\/entry-button\/button-only@2x.png\" alt=\"\u3053\u306e\u30a8\u30f3\u30c8\u30ea\u30fc\u3092\u306f\u3066\u306a\u30d6\u30c3\u30af\u30de\u30fc\u30af\u306b\u8ffd\u52a0\" width=\"20\" height=\"20\" style=\"border: none;\" \/><\/a><script type=\"text\/javascript\" src=\"\/\/b.hatena.ne.jp\/js\/bookmark_button.js\" charset=\"utf-8\" async=\"async\"><\/script><\/div>\n            <div class=\"wsbl_twitter\"><a href=\"https:\/\/twitter.com\/share\" class=\"twitter-share-button\" data-url=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/10122\" data-text=\"A touch to serverless framework part 1\" data-via=\"GIGASJAPAN_APPS\" data-lang=\"ja\">Tweet<\/a><\/div>\n            <div class=\"wsbl_facebook_like\"><div id=\"fb-root\"><\/div><fb:like href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/10122\" layout=\"button_count\" action=\"like\" width=\"100\" share=\"false\" show_faces=\"false\" ><\/fb:like><\/div>\n            <div class=\"wsbl_facebook_send\"><div id=\"fb-root\"><\/div><fb:send href=\"https:\/\/www.gigas-jp.com\/appnews\/archives\/10122\" colorscheme=\"light\" ><\/fb:send><\/div>\n    <\/div>\n<br class='wp_social_bookmarking_light_clear' \/>\n","protected":false},"excerpt":{"rendered":"<p>A few weeks ago, I wrote an article about serverless and today I will make a touch to serverless framework usi [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[35],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/10122"}],"collection":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/comments?post=10122"}],"version-history":[{"count":6,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/10122\/revisions"}],"predecessor-version":[{"id":10141,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/posts\/10122\/revisions\/10141"}],"wp:attachment":[{"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/media?parent=10122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/categories?post=10122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gigas-jp.com\/appnews\/wp-json\/wp\/v2\/tags?post=10122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}