{"id":2163,"date":"2022-09-20T19:59:44","date_gmt":"2022-09-20T17:59:44","guid":{"rendered":"https:\/\/blog.kodono.info\/wordpress\/?p=2163"},"modified":"2022-09-20T20:00:51","modified_gmt":"2022-09-20T18:00:51","slug":"transfer-a-aws-lambda-function-from-the-online-editor-to-the-ask-cli","status":"publish","type":"post","link":"https:\/\/blog.kodono.info\/wordpress\/2022\/09\/20\/transfer-a-aws-lambda-function-from-the-online-editor-to-the-ask-cli\/","title":{"rendered":"Transfer an Alexa AWS Lambda function from the online editor to the ASK CLI"},"content":{"rendered":"<p>When we follow <a href=\"https:\/\/developer.amazon.com\/en-US\/docs\/alexa\/smarthome\/develop-smart-home-skills-in-multiple-languages.html\">the guide to build a new smarthome skill<\/a>, it gives the steps to create a function in the online code editor.<\/p>\n<p>But if you prefer to use the <a href=\"https:\/\/developer.amazon.com\/en-US\/docs\/alexa\/smapi\/ask-cli-intro.html\">ASK CLI<\/a>, there is some steps to follow\u2026<\/p>\n<p>I first create a fake skill with <code>ask new<\/code> (using the &#8220;hello world&#8221; and &#8220;AWS Lambda&#8221; options).<\/p>\n<p>Once the folder structure and files are created, I edit the <code>.ask\/ask-states.json<\/code> file to reflect the information from the skill I created during the guide.<\/p>\n<p>Then in the folder <code>skill-package<\/code> I remove everything except <code>skill.json<\/code>. To find what to put into that file, use the command: <code>ask smapi get-skill-manifest -s &lt;SKILL ID&gt;<\/code> and copy\/paste that code.<\/p>\n<p>Finally, I force the deploy with <code>ask deploy --ignore-hash<\/code>.<\/p>\n<p>The Lambda function can now be managed locally on your computer and deployed with ASK CLI. You can go to the different skill consoles to delete the fake skill &#8220;hello world&#8221; you created.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When we follow the guide to build a new smarthome skill, it gives the steps to create a function in the online code editor. But if you prefer to use the ASK CLI, there is some steps to follow\u2026 I first create a fake skill with ask new (using the &#8220;hello world&#8221; and &#8220;AWS Lambda&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","hide_page_title":"","footnotes":""},"categories":[170,20],"tags":[123,155],"class_list":["post-2163","post","type-post","status-publish","format-standard","hentry","category-english","category-niveau-expert","tag-english","tag-niveau-expert"],"_links":{"self":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/comments?post=2163"}],"version-history":[{"count":3,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2163\/revisions"}],"predecessor-version":[{"id":2166,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/posts\/2163\/revisions\/2166"}],"wp:attachment":[{"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/media?parent=2163"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/categories?post=2163"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kodono.info\/wordpress\/wp-json\/wp\/v2\/tags?post=2163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}