{"id":333889,"date":"2022-06-01T09:00:13","date_gmt":"2022-06-01T09:00:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=333889"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=333889","title":{"rendered":"<span>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 AWS Lambda \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u0431\u044d\u043a\u0435\u043d\u0434\u0430 \u0434\u043b\u044f Slack<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yi\/aw\/qs\/yiawqsagdbkdqibmeyzxmppe6eu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/yi\/aw\/qs\/yiawqsagdbkdqibmeyzxmppe6eu.png\"\/><\/div>\n<p>  \u0421\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 AWS Lambda \u0438 Amazon API Gateway \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 API. \u042d\u0442\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u0430 \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/tu\/db\/yh\/tudbyhgc2x4w27arlyv1o7z0qaa.png\" data-src=\"https:\/\/habrastorage.org\/webt\/tu\/db\/yh\/tudbyhgc2x4w27arlyv1o7z0qaa.png\"\/><\/div>\n<p>  API Gateway \u2014 \u044d\u0442\u043e \u043c\u043d\u043e\u0433\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 API (HTTP, REST, WebSocket), \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0445\u0435\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f API, \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 Canary (<a href=\"https:\/\/harness.io\/blog\/continuous-verification\/blue-green-canary-deployment-strategies\/\">Canary Deployment<\/a>) \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u043e\u043c\u043d\u0435\u0435, \u0438 \u0432\u0441\u0451, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u044d\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 HTTP(S) \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 Lambda \u0444\u0443\u043d\u043a\u0446\u0438\u0438(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u0430), \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-urls.html\">URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 Lambda<\/a>. \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0435 URL-\u0444\u0443\u043d\u043a\u0446\u0438\u0438, Lambda \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP(S), \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c URL-\u0430\u0434\u0440\u0435\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Lambda. \u0412\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u0442\u0435 <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-golang.html\">\u0444\u0443\u043d\u043a\u0446\u0438\u044e Go Lambda<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u043c \u0432\u0435\u0431\u0445\u0443\u043a \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c \u0434\u043b\u044f <a href=\"https:\/\/slack.com\/\">Slack<\/a>.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u0448\u0430\u0433\u043e\u0432\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442:<\/p>\n<ul>\n<li>\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043e\u0431\u0437\u043e\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f.<\/li>\n<li>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0438 \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u043d\u0430\u0440\u044f\u0434\u0443 \u0441 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435).<\/li>\n<li>\u0418\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Slack, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u043a\u0432\u043e\u0437\u043d\u0443\u044e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044e.<\/li>\n<li>\u2026 \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043b\u0443\u0447\u0430\u0439\u0442\u0435 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435.<\/li>\n<\/ul>\n<p>  \u041a \u043a\u043e\u043d\u0446\u0443 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 \u0432\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u0435, \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u0442\u0435 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0451\u0442\u0435 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 (\u0438, \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0432\u0435\u0441\u0451\u043b\u043e\u0435?) \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c URL-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 Lambda. \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0431\u0449\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0431 \u044d\u0442\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439.<\/p>\n<blockquote><p>\u041a\u043e\u0434 \u0442\u0430\u043a\u0436\u0435 <a href=\"https:\/\/github.com\/abhirockzz\/awsome-slack-backend\">\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043d\u0430 GitHub<\/a>.<\/p><\/blockquote>\n<p>  <\/p>\n<h2><font color=\"#076184\">\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/font><\/h2>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0435, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0443\u0440\u0435\u0437\u0430\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e <a href=\"https:\/\/get.slack.help\/hc\/en-us\/articles\/204714258-Giphy-for-Slack\">Giphy \u0434\u043b\u044f Slack<\/a>. \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 Giphy \u0434\u043b\u044f Slack \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043a\u0443\u0447\u0443 GIF-\u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u043e \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u043c\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0443, \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445. \u0427\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443, \u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043b \u0435\u0451 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u0431\u044d\u043a\u0435\u043d\u0434 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u043b \u043e\u0434\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u043c\u0443 \u0441\u043b\u043e\u0432\u0443 \u043f\u043e\u0438\u0441\u043a\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/developers.giphy.com\/docs\/#operation--gifs-random-get\">Giphy Random API<\/a>.<\/p>\n<p>  \u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u043a\u0430\u043a <a href=\"https:\/\/api.slack.com\/interactivity\/slash-commands\">Slash-\u043a\u043e\u043c\u0430\u043d\u0434\u0430<\/a> \u0432 Slack, \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0438\u0437 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 Slack, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>\/awsome &lt;\u0432\u0430\u0448 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441><\/code> (\u0433\u0434\u0435 <code>awsome<\/code> \u2014 \u043d\u0435 \u0447\u0442\u043e \u0438\u043d\u043e\u0435, \u043a\u0430\u043a \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 slash-\u043a\u043e\u043c\u0430\u043d\u0434\u044b). \u042d\u0442\u043e, \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u0432\u044b\u0437\u043e\u0432\u0435\u0442 URL-\u0430\u0434\u0440\u0435\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Lambda (\u043e \u0435\u0451 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0435\u043c \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u0441\u044f \u043e\u0431\u043e \u0432\u0441\u0451\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u043c.<\/p>\n<p>  \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0435\u0441\u043b\u0438 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0435\u0451 \u0438\u0437 \u0440\u0430\u0431\u043e\u0447\u0435\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 Slack, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>\/awsome serverless<\/code>, \u043e\u043d\u0430 \u0432\u0435\u0440\u043d\u0451\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u0433\u0438\u0444\u043a\u0443 (\u0432\u044b \u0441\u0430\u043c\u0438 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e \u043f\u043e\u0437\u0436\u0435).<\/p>\n<p>  \u0412\u043e\u0442 \u043e\u0431\u0449\u0438\u0439 \u043e\u0431\u0437\u043e\u0440 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f Lambda:<\/p>\n<ul>\n<li>\u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u044b\u0437\u043e\u0432\u0430 Slash Commands \u2014 Slack \u043d\u0430 URL-\u0430\u0434\u0440\u0435\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Lambda \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u043e\u0439 base64 \u2014 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0435\u0451 \u0434\u0435\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435.<\/li>\n<li>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e Slack, \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u044d\u0442\u043e \u0442\u0430\u043a. Slack \u0434\u0435\u043b\u0430\u0435\u0442 \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u044b, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u043a\u0440\u0435\u0442 (<a href=\"https:\/\/api.slack.com\/authentication\/verifying-requests-from-slack\">signing secret<\/a>) \u2014 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 Go-\u0432\u0435\u0440\u0441\u0438\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e <a href=\"https:\/\/api.slack.com\/authentication\/verifying-requests-from-slack\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043f\u0440\u043e\u0448\u043b\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e (\u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u0443\u0434\u0430\u0447\u0438 \u043c\u044b \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u043e\u0448\u0438\u0431\u043a\u0443), \u0437\u0430\u043f\u0440\u043e\u0441 Slack \u043f\u0430\u0440\u0441\u0438\u0442\u0441\u044f, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0442\u0435\u043a\u0441\u0442 (<code>text<\/code>) \u043f\u043e\u0438\u0441\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c.<\/li>\n<li>\u0417\u0430\u0442\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f <a href=\"https:\/\/developers.giphy.com\/docs\/api\/endpoint#random\">Giphy Random API<\/a> \u0441 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c. \u0415\u0441\u043b\u0438 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442, \u0442\u043e \u043f\u0430\u0440\u0441\u0438\u043c \u0435\u0433\u043e \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0432 Slack \u0432 \u043d\u0443\u0436\u043d\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.<\/li>\n<\/ul>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0433\u0438\u0444\u043a\u0443 \u0432 \u0441\u0432\u043e\u0451\u043c \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 Slack.<\/p>\n<p>  \u042f \u043f\u0440\u043e\u043f\u0443\u0449\u0443 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a\u043e\u0434\u0430, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u0445 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0437\u0430\u0441\u043b\u0443\u0436\u0438\u0432\u0430\u0435\u0442 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u2014 \u043e\u043d\u0430 \u043f\u043e\u0445\u043e\u0436\u0430 \u043d\u0430 \u0442\u0443, \u0447\u0442\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 \u0431\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430 \u0431\u0430\u0437\u0435 API Gateway:<\/p>\n<pre><code class=\"plaintext\">func Funcy(r events.LambdaFunctionURLRequest) (events.LambdaFunctionURLResponse, error) {     ... }<\/code><\/pre>\n<p>  \u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/pkg.go.dev\/github.com\/aws\/aws-lambda-go\/events#LambdaFunctionURLRequest\">events.LambdaFunctionURLRequest<\/a> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0445\u043e\u0434\u0430 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c <a href=\"https:\/\/pkg.go.dev\/github.com\/aws\/aws-lambda-go\/events#LambdaFunctionURLResponse\">events.LambdaFunctionURLResponse<\/a>. \u0417\u0430 \u043a\u0443\u043b\u0438\u0441\u0430\u043c\u0438 Lambda \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0435\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043e\u0442\u0432\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 HTTP-\u043e\u0442\u0432\u0435\u0442\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Lambda \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043a\u043b\u0438\u0435\u043d\u0442\u0443 \u0447\u0435\u0440\u0435\u0437 URL-\u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<blockquote><p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/urls-invocation.html#urls-payloads\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p><\/blockquote>\n<p>  \u0414\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e, \u0432\u0435\u0440\u043d\u043e? \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0438 API Gateway \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u043e\u0439 \u0448\u043b\u044e\u0437.<\/p>\n<p>  \u0421 \u044d\u0442\u043e\u0439 \u0432\u0432\u043e\u0434\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u043c \u043a \u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438, \u0433\u0434\u0435 \u0432\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0451\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0432 Slack. \u041d\u043e \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043e \u0432\u0441\u0451 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435:<\/p>\n<h2><font color=\"#076184\">\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f<\/font><\/h2>\n<p>  <\/p>\n<ul>\n<li><a href=\"https:\/\/portal.aws.amazon.com\/gp\/aws\/developer\/registration\/index.html\">\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c AWS<\/a> (\u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0451 \u0435\u0449\u0451 \u043d\u0435\u0442) \u0438 \u0432\u043e\u0439\u0434\u0438\u0442\u0435 \u0432 \u043d\u0435\u0451. \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c IAM, \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435, \u0434\u043e\u043b\u0436\u0435\u043d \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u044b\u043c\u0438 \u043f\u043e\u043b\u043d\u043e\u043c\u043e\u0447\u0438\u044f\u043c\u0438 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0441\u043b\u0443\u0436\u0431 AWS \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 AWS.<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 <a href=\"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/install-cliv2.html\">AWS CLI<\/a>.<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 <a href=\"https:\/\/go.dev\/dl\/\">Go<\/a>.<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 <a href=\"https:\/\/git-scm.com\/downloads\">Git<\/a>.<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 <a href=\"https:\/\/slack.com\/create\">\u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e Slack<\/a>, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0433\u043e \u043d\u0435\u0442.<\/li>\n<li>\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0443\u0447\u0451\u0442\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c GIPHY (\u044d\u0442\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e) \u0438 <a href=\"https:\/\/developers.giphy.com\/dashboard\/?create=true\">\u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/a>. \u041a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0435 \u0432\u0430\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 API-\u043a\u043b\u044e\u0447.<\/li>\n<\/ul>\n<p>  <\/p>\n<blockquote><p>\u041f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430, \u0437\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u043a\u043b\u044e\u0447 API GIPHY, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u044b \u0435\u0449\u0451 \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c<\/p><\/blockquote>\n<p>  \u0421\u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0451\u043d\u043d\u044b\u0439 \u043d\u0438\u0436\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 Github \u0438 \u043f\u0435\u0440\u0435\u043c\u0435\u0441\u0442\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u043d\u0443\u0436\u043d\u0443\u044e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e:<\/p>\n<pre><code class=\"plaintext\">git clone https:\/\/github.com\/abhirockzz\/awsome-slack-backend cd awsome-slack-backend\/function <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0412 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0448\u0430\u0433\u0430\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f AWS CLI \u2014 \u044f \u043d\u0430\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b AWS CLI, \u0447\u0442\u043e\u0431\u044b \u043e\u0441\u0432\u0435\u0442\u0438\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. \u0422\u0430\u043a\u0436\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/urls-tutorial.html\">\u044d\u0442\u0438\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e\u043c<\/a> \u043f\u043e CloudFormation \u0438 SAM.<\/p><\/blockquote>\n<p>  <\/p>\n<h2><font color=\"#076184\">\u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435, \u0437\u0430\u0430\u0440\u0445\u0438\u0432\u0438\u0440\u0443\u0439\u0442\u0435 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e<\/font><\/h2>\n<p>  <\/p>\n<pre><code class=\"plaintext\">export FUNC_NAME=awsome-slack-backend export FUNC_GO_BINARY_NAME=awsome export ZIP_NAME=function.zip  GOOS=linux go build -o $FUNC_GO_BINARY_NAME main.go  zip function.zip $FUNC_GO_BINARY_NAME <\/code><\/pre>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0440\u043e\u043b\u044c IAM \u0434\u043b\u044f Lambda \u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443 <code>AWSLambdaBasicExecutionRole<\/code>:<\/p>\n<pre><code class=\"plaintext\">export ROLE_NAME=demo-lambda-role  ROLE_ARN=$(aws iam create-role \\         --role-name $ROLE_NAME \\         --assume-role-policy-document '{\"Version\": \"2012-10-17\",\"Statement\": [{ \"Effect\": \"Allow\", \"Principal\": {\"Service\": \"lambda.amazonaws.com\"}, \"Action\": \"sts:AssumeRole\"}]}' \\         --query 'Role.[Arn]' --output text)  aws iam attach-role-policy --role-name $ROLE_NAME --policy-arn arn:aws:iam::aws:policy\/service-role\/AWSLambdaBasicExecutionRole <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<\/p>\n<pre><code class=\"plaintext\">aws lambda create-function \\     --function-name $FUNC_NAME \\     --runtime go1.x \\     --zip-file fileb:\/\/$ZIP_NAME \\     --handler $FUNC_GO_BINARY_NAME \\     --role $ROLE_ARN <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0430, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044e URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"plaintext\">aws lambda create-function-url-config \\     --function-name $FUNC_NAME \\     --auth-type NONE <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u043e\u0431\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c NONE \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0438\u043f\u0430 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e URL-\u0430\u0434\u0440\u0435\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Lambda \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u2014 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0447\u0443\u0442\u044c \u043f\u043e\u0437\u0436\u0435.<\/p><\/blockquote>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u0435\u0440\u0435\u0439\u0434\u0451\u0442\u0435 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c AWS \u0438 \u043e\u0442\u043a\u0440\u043e\u0435\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 URL-\u0430\u0434\u0440\u0435\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0439 \u0441 \u043d\u0435\u0439:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/m6\/p2\/jp\/m6p2jpifupblyvndc5h_d8opcmu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/m6\/p2\/jp\/m6p2jpifupblyvndc5h_d8opcmu.png\"\/><\/div>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u2014 \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 URL-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0432\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0435\u0433\u043e \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0438\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>curl<\/code>).<\/p>\n<pre><code class=\"plaintext\">curl -i &lt;FUNCTION_URL> <\/code><\/pre>\n<p>  \u0412\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442 <code>{\"Message\": \"Forbidden\"}<\/code> \u0441 \u043a\u043e\u0434\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f <code>HTTP 403 Forbidden<\/code>.<\/p>\n<blockquote><p>\u041d\u0435 \u0432\u043e\u043b\u043d\u0443\u0439\u0442\u0435\u0441\u044c, \u044d\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u2014 \u044f \u0445\u043e\u0442\u0435\u043b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0432\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0451\u0442\u0435\u0441\u044c \u0441 \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u0438 \u043f\u043e\u0439\u043c\u0451\u0442\u0435 \u0435\u0451 \u043f\u0435\u0440\u0432\u043e\u043f\u0440\u0438\u0447\u0438\u043d\u0443.<\/p><\/blockquote>\n<p>  \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <code>NONE<\/code> \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0445\u0435\u043c\u044b \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u0432\u0441\u0451 \u0440\u0430\u0432\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f <code>lambda:InvokeFunctionUrl<\/code>, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c URL-\u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0435 URL-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u0441 \u0442\u0438\u043f\u043e\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 <code>NONE<\/code>) \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 AWS (AWS Serverless Application Model), Lambda <i>\u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438<\/i> \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0437\u0430\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0432 <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/urls-auth.html#urls-auth-none\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>). \u042d\u0442\u043e \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u043e, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 AWS CLI (\u043a\u0430\u043a \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435), AWS CloudFormation \u0438\u043b\u0438 Lambda API \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u2014 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e:<\/p>\n<pre><code class=\"plaintext\">aws lambda add-permission \\     --function-name $FUNC_NAME \\     --action lambda:InvokeFunctionUrl \\     --statement-id FunctionURLAllowPublicAccess \\     --principal \"*\" \\     --function-url-auth-type NONE <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0427\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0443, \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043a \u0441\u0432\u043e\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 AWS: \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f (Configuration) > \u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u044f (Permissions).<\/p><\/blockquote>\n<p>  \u0412\u044b\u0437\u043e\u0432\u0438\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0441\u043d\u043e\u0432\u0430:<\/p>\n<pre><code class=\"plaintext\">curl -i &lt;FUNCTION_URL> <\/code><\/pre>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u0441 \u043a\u043e\u0434\u043e\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f <code>HTTP 401 Unauthorized<\/code>. \u042d\u0442\u043e \u0442\u043e\u0436\u0435 \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0451 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e.<\/p>\n<h2><font color=\"#076184\">\u041d\u0430\u0441\u0442\u0440\u043e\u0438\u043c Slack<\/font><\/h2>\n<p>  <\/p>\n<blockquote><p>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0439 \u0432 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0431\u044b\u043b\u0438 \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0438\u0437 <a href=\"https:\/\/api.slack.com\/slash-commands#creating_commands\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 Slack<\/a>.<\/p><\/blockquote>\n<p>  \u041d\u0430\u0447\u043d\u0438\u0442\u0435 \u0441\u043e \u0432\u0445\u043e\u0434\u0430 \u0432 <a href=\"https:\/\/slack.com\/signin\">\u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e Slack<\/a> \u0438 <a href=\"https:\/\/api.slack.com\/apps\/new\">\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Slack<\/a>.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 (<a href=\"https:\/\/api.slack.com\/legacy\/custom-integrations\/slash-commands\">Slash Command<\/a>) \u2014 \u043f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <i>Slash Commands<\/i> \u0432 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043c\u0435\u043d\u044e. \u041f\u0435\u0440\u0435\u0434 \u0432\u0430\u043c\u0438 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043a\u043d\u043e\u043f\u043a\u0430 \u00ab\u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443\u00bb (<i>Create New Command<\/i>), \u043d\u0430\u0436\u0430\u0432 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043e\u043a\u043d\u043e, \u0433\u0434\u0435 \u0432\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u0441 \u043a\u043e\u0441\u043e\u0439 \u0447\u0435\u0440\u0442\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<p>  \u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u2014 <code>\/awsome<\/code> \u0434\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 URL Lambda \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 <i>Request URL<\/i>.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/ms\/t4\/fk\/mst4fkpqpz4ytybqwqiltyxjrrc.png\" data-src=\"https:\/\/habrastorage.org\/webt\/ms\/t4\/fk\/mst4fkpqpz4ytybqwqiltyxjrrc.png\"\/><\/div>\n<p>  \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u2014 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 \u043d\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 (<i>Basic Information<\/i>) \u0432 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u043c\u0435\u043d\u044e, \u0432\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043f\u0443\u043d\u043a\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e (<i>Install your app to your workspace<\/i>) \u0438 \u043d\u0430\u0436\u043c\u0438\u0442\u0435 <i>Install App to Workspace<\/i>. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0431\u043e\u0447\u0443\u044e \u043e\u0431\u043b\u0430\u0441\u0442\u044c Slack \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 <a href=\"https:\/\/api.slack.com\/interactivity\/slash-commands\">\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u043e\u0432<\/a>, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0445 \u0434\u043b\u044f \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0441 API Slack.<\/p>\n<p>  \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u043f\u0443\u043d\u043a\u0442 \u0441 \u0443\u0447\u0451\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (<i>App Credentials<\/i>). \u041e\u0442\u0442\u0443\u0434\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u043a\u0440\u0435\u0442 Slack (<i>Slack Signing Secret<\/i>).<\/p>\n<blockquote><p>\u0417\u0430\u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u0432\u043e\u0439 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u043a\u0440\u0435\u0442, \u0442\u0430\u043a \u043a\u0430\u043a \u0432\u044b \u0435\u0449\u0451 \u0431\u0443\u0434\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0437\u0434\u043d\u0435\u0435.<\/p><\/blockquote>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/jd\/lt\/xc\/jdltxcog1opgflpp4szw7yduzhy.png\" data-src=\"https:\/\/habrastorage.org\/webt\/jd\/lt\/xc\/jdltxcog1opgflpp4szw7yduzhy.png\"\/><\/div>\n<p>  <\/p>\n<h2><font color=\"#076184\">\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/font><\/h2>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u043a\u043b\u044e\u0447 Slack, \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0437\u0430\u0431\u043e\u0442\u0438\u0442\u044c\u0441\u044f \u043e \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0442\u0430\u043a\u0436\u0435 \u0431\u044b\u043b \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d \u0438 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438. \u0422\u0430\u043a\u0436\u0435 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u043f\u0440\u043e \u043a\u043b\u044e\u0447 API GIPHY, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d \u043d\u0443\u0436\u0435\u043d \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0439 \u0442\u043e\u0447\u043a\u0438 GIPHY REST.<\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0445 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"plaintext\">aws lambda update-function-configuration \\     --function-name $FUNC_NAME \\     --environment \"Variables={SLACK_SIGNING_SECRET=&lt;enter Slack signing secret>,GIPHY_API_KEY=&lt;enter Giphy API key>}\" <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0439 \u0434\u043b\u044f Slack \u0438 GIPHY \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b Lambda \u2014 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. \u0414\u043b\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0443\u0447\u0451\u0442\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0438\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043a\u0430\u043a <a href=\"https:\/\/aws.amazon.com\/secrets-manager\">AWS Secrets Manager<\/a>.<\/p><\/blockquote>\n<p>  <\/p>\n<h2><font color=\"#076184\">\u0412\u0441\u0451 \u0433\u043e\u0442\u043e\u0432\u043e!<\/font><\/h2>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0438\u0442\u0435 \u0432 \u0441\u0432\u043e\u0451 \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e Slack \u0438 \u0432\u044b\u0437\u043e\u0432\u0438\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u0433\u0438\u0444\u043a\u0443 \u0441 \u043a\u043e\u0448\u0435\u0447\u043a\u043e\u0439, \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0432\u0435\u0434\u0438\u0442\u0435:<\/p>\n<pre><code class=\"plaintext\">\/awsome cat <\/code><\/pre>\n<p>  \u042f \u043f\u043e\u043b\u0443\u0447\u0438\u043b \u0442\u0430\u043a\u043e\u0439 \u043e\u0442\u0432\u0435\u0442 \u0441 \u043a\u043e\u043c\u0430\u043d\u0434\u044b. \u0410 \u0432\u044b? \ud83d\ude42<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/pe\/eg\/0g\/peeg0gctgubhgazneryztjr8kqo.gif\" data-src=\"https:\/\/habrastorage.org\/webt\/pe\/eg\/0g\/peeg0gctgubhgazneryztjr8kqo.gif\"\/><\/div>\n<p>  \u041d\u0435 \u0441\u0442\u0435\u0441\u043d\u044f\u0439\u0442\u0435\u0441\u044c \u043f\u043e\u0431\u0430\u043b\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0438\u043c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<h2><font color=\"#076184\">\u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a, \u043f\u0440\u0438\u0431\u0435\u0440\u0451\u043c\u0441\u044f<\/font><\/h2>\n<p>  \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u0442\u0435, \u0443\u0434\u0430\u043b\u0438\u0442\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u043e\u0439 \u0438 \u0440\u043e\u043b\u044c\u044e IAM.<\/p>\n<pre><code class=\"plaintext\">aws lambda delete-function --function-name $FUNC_NAME  aws iam detach-role-policy  --role-name $ROLE_NAME --policy-arn arn:aws:iam::aws:policy\/service-role\/AWSLambdaBasicExecutionRole  aws iam delete-role --role-name $ROLE_NAME <\/code><\/pre>\n<p>  <\/p>\n<h2><font color=\"#076184\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/font><\/h2>\n<p>  \u0412\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u0431\u044d\u043a\u0435\u043d\u0434 \u0434\u043b\u044f Slack, \u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0443\u0437\u043d\u0430\u043b\u0438 \u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u0445 URL-\u0430\u0434\u0440\u0435\u0441\u043e\u0432 Lambda \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 \u043f\u0440\u0438\u0437\u043c\u0443 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u042f \u0431\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043b \u0432\u0430\u043c \u0438\u0437\u0443\u0447\u0438\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/urls-auth.html#urls-auth-iam\">\u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f AWS_IAM<\/a>, <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/urls-configuration.html#urls-cors\">\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f CORS<\/a>, <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/urls-configuration.html#urls-throttling\">\u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u0440\u043e\u0441\u0441\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/a>, <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/urls-monitoring.html\">\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433<\/a> \u0438 \u0442.\u0434.<\/p>\n<p>  \u0421\u0447\u0430\u0441\u0442\u043b\u0438\u0432\u043e\u0433\u043e \u043a\u043e\u0434\u0438\u043d\u0433\u0430!<\/p>\n<hr\/>\n<p>\u041d\u041b\u041e \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u043e \u0438 \u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u043e\u043c\u043e\u043a\u043e\u0434 \u0434\u043b\u044f \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430\u0448\u0435\u0433\u043e \u0431\u043b\u043e\u0433\u0430:<\/p>\n<p>   \u2014 <a href=\"https:\/\/firstvds.ru\/?utm_source=habr&amp;utm_medium=article&amp;utm_campaign=product&amp;utm_content=vds15exeptprogrev\">15% \u043d\u0430 \u0432\u0441\u0435 \u0442\u0430\u0440\u0438\u0444\u044b VDS<\/a> (\u043a\u0440\u043e\u043c\u0435 \u0442\u0430\u0440\u0438\u0444\u0430 \u041f\u0440\u043e\u0433\u0440\u0435\u0432) \u2014 <b><font color=\"#163C51\">HABRFIRSTVDS<\/font><\/b>.<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/first\/blog\/667204\/\"> https:\/\/habr.com\/ru\/company\/first\/blog\/667204\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-1\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/yi\/aw\/qs\/yiawqsagdbkdqibmeyzxmppe6eu.png\" data-src=\"https:\/\/habrastorage.org\/webt\/yi\/aw\/qs\/yiawqsagdbkdqibmeyzxmppe6eu.png\"\/><\/div>\n<p>  \u0421\u043e\u0447\u0435\u0442\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 AWS Lambda \u0438 Amazon API Gateway \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043a\u0430\u043a \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u043d\u0430 \u0431\u0430\u0437\u0435 API. \u042d\u0442\u0430 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u0430 \u043d\u0435 \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c\u0438.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/tu\/db\/yh\/tudbyhgc2x4w27arlyv1o7z0qaa.png\" data-src=\"https:\/\/habrastorage.org\/webt\/tu\/db\/yh\/tudbyhgc2x4w27arlyv1o7z0qaa.png\"\/><\/div>\n<p>  API Gateway \u2014 \u044d\u0442\u043e \u043c\u043d\u043e\u0433\u043e\u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0449\u0435\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 API (HTTP, REST, WebSocket), \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0445\u0435\u043c \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f API, \u0440\u0430\u0437\u0432\u0451\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u0435 Canary (<a href=\"https:\/\/harness.io\/blog\/continuous-verification\/blue-green-canary-deployment-strategies\/\">Canary Deployment<\/a>) \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u0435\u0441\u043b\u0438 \u0432\u0430\u0448\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u043e\u043c\u043d\u0435\u0435, \u0438 \u0432\u0441\u0451, \u0447\u0442\u043e \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e, \u044d\u0442\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u0430\u044f \u0442\u043e\u0447\u043a\u0430 HTTP(S) \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 Lambda \u0444\u0443\u043d\u043a\u0446\u0438\u0438(\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u0430), \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-urls.html\">URL-\u0430\u0434\u0440\u0435\u0441\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 Lambda<\/a>. \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0435 URL-\u0444\u0443\u043d\u043a\u0446\u0438\u0438, Lambda \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u043a\u043e\u043d\u0435\u0447\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 HTTP(S), \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u0443\u044e \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<\/p>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u043f\u043e\u043a\u0430\u0436\u0435\u043c \u043d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c URL-\u0430\u0434\u0440\u0435\u0441 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Lambda. \u0412\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u0442\u0435 <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/lambda-golang.html\">\u0444\u0443\u043d\u043a\u0446\u0438\u044e Go Lambda<\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u043c \u0432\u0435\u0431\u0445\u0443\u043a \u0431\u044d\u043a\u0435\u043d\u0434\u043e\u043c \u0434\u043b\u044f <a href=\"https:\/\/slack.com\/\">Slack<\/a>.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-333889","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/333889","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=333889"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/333889\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=333889"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=333889"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=333889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}