{"id":298532,"date":"2020-02-11T15:00:24","date_gmt":"2020-02-11T15:00:24","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=298532"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-02-11T15:00:24","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=298532","title":{"rendered":"AWS Lambda in Action \u043d\u0430 Java 11. \u0417\u0430\u0435\u0437\u0436\u0430\u0435\u043c \u0441 Serverless \u0432 \u00abProduction\u00bb"},"content":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/dins\/blog\/486648\/\">\u0421\u0442\u0430\u0442\u044c\u044f \u2013 \u0433\u0430\u0439\u0434 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0431\u0435\u0437 \u0431\u043e\u043b\u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c AWS Lambda \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u041f\u043e\u0434\u043e\u0439\u0434\u0435\u0442, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443, \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0435\u043c\u0443 \u0441 Lambda \u0432\u043e\u0432\u0441\u0435, \u0442\u0430\u043a \u0438 \u043f\u043e\u0437\u043d\u0430\u0432\u0448\u0435\u043c\u0443 Cloud, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0432\u0438\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 Serverless \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bd\/y8\/lu\/bdy8luzeox9qq09msokx8yzoba4.jpeg\" alt=\"image\"><br \/>  <a name=\"habracut\"><\/a><\/p>\n<h1>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h1>\n<p>  \u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442. <br \/>  \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440 \u0413\u0440\u0443\u0437\u0434\u0435\u0432, \u044f Java Team Lead \u0432 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 DINS. \u0423\u0436\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u0434\u0432\u0443\u0445 \u043b\u0435\u0442 \u044f \u0442\u0435\u0441\u043d\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0441 AWS-\u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0438 \u0438\u043c\u0435\u044e \u043e\u043f\u044b\u0442 \u043a\u0430\u043a \u0432 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043f\u043e\u0434 AWS, \u0442\u0430\u043a \u0438 \u0432 \u0434\u0435\u043f\u043b\u043e\u0439\u043c\u0435\u043d\u0442\u0435 \u044d\u0442\u0438\u0445 \u0441\u0430\u043c\u044b\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0412 \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u043c\u043d\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u043b\u043e\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c ElasticBeanstalk, ECS, Fargate, EKS, \u043d\u0443 \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, AWS Lambda.<\/p>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0445\u043e\u0440\u043e\u0448 \u043f\u043e-\u0441\u0432\u043e\u0435\u043c\u0443, \u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e AWS Lambda \u043a\u0430\u043a \u0437\u0430\u043c\u0435\u043d\u0443 \u0432\u0441\u0435\u043c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c. \u042f \u043b\u0438\u0448\u044c \u0445\u043e\u0447\u0443 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c, \u043a\u0430\u043a \u043b\u0435\u0433\u043a\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Lambda, \u0438 \u0432 \u043a\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u043e\u0442 \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0412\u0441\u0435, \u043d\u0430\u0447\u0438\u043d\u0430\u044f \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u043e\u0432 \u0438 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044f \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u043c\u0438, \u0445\u043e\u0442\u044f\u0442 \u0438\u043c\u0435\u0442\u044c \u0447\u0435\u0442\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u0430\u043c. \u0427\u0435\u043c \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0437\u0440\u0430\u0447\u0435\u043d \u044d\u0442\u043e\u0442 \u043f\u0443\u0442\u044c \u0438 \u0447\u0435\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u0443\u0441\u0438\u043b\u0438\u0439 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u2013 \u0442\u0435\u043c \u0432\u044b\u0433\u043e\u0434\u043d\u0435\u0435. \u0427\u0430\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0438 \u043d\u0435 \u0445\u043e\u0442\u044f\u0442 \u0437\u043d\u0430\u0442\u044c, \u043a\u0443\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u043a\u0430\u043a\u0443\u044e \u0436\u0435\u043b\u0435\u0437\u043a\u0443 \u0432\u044b\u0431\u0440\u0430\u0442\u044c, \u0432 \u043a\u0430\u043a\u043e\u0439 \u0440\u0435\u0433\u0438\u043e\u043d \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0440\u0435\u043f\u043b\u0438\u043a\u0438 \u0438 \u0442.\u0434. \u041d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u0443\u0441\u043b\u0443\u0433\u0438 \u043a\u043b\u0430\u0441\u0441\u0430 \u201caaS\u201d (as a service), \u0433\u0434\u0435 AWS Lambda \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044e FaaS.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/z8\/nj\/wl\/z8njwlqjrgatljwptthtqe9ealu.png\" alt=\"image\"><\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">FaaS \u0432 \u0434\u0432\u0443\u0445 \u0441\u043b\u043e\u0432\u0430\u0445<\/b><\/p>\n<div class=\"spoiler_text\">FaaS \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0435 \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, CRUD \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 C, R, U, D \u0438 \u043f\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c Create \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0438 Read. \u042d\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435, \u043d\u043e \u044d\u0442\u043e \u2014 \u043b\u0438\u0448\u044c \u043f\u0440\u0438\u043c\u0435\u0440.  <\/div>\n<\/div>\n<h1>\u0418\u0434\u0435\u044f<\/h1>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 Serverless-\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u0437\u044f\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440. \u0414\u0443\u043c\u0430\u044e, \u0432\u044b \u043d\u0430 \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u0430\u0439\u0442\u0430\u0445 \u0432\u0438\u0434\u0435\u043b\u0438 \u0444\u043e\u0440\u043c\u0443 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 Contact Us, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0430\u0448\u0438 \u043f\u043e\u0447\u0442\u0443 \u0438\u043b\u0438 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u0438 \u0437\u0430\u0434\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u043c \u043f\u043e\u0437\u0436\u0435 \u043e\u0442\u0432\u0435\u0442\u0438\u043b\u0438. \u0421\u043a\u0440\u0438\u043d \u043d\u0438\u0436\u0435, \u0444\u043e\u0440\u043c\u0430 \u043d\u0435 \u0441\u0443\u043f\u0435\u0440, \u043d\u043e \u0438 \u0441\u0430\u0431\u0436 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u2013 \u043d\u0435 material design.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gv\/5g\/iv\/gv5givju7glj8vftkb1cdhupdiw.png\"><\/p>\n<p>  \u0417\u0430\u043f\u043e\u043b\u043d\u0438\u0432 \u044d\u0442\u0443 \u0444\u043e\u0440\u043c\u0443, \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0438\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u0436\u0434\u0430\u0442\u044c \u0437\u0432\u043e\u043d\u043a\u0430 \u0438\u043b\u0438 \u043f\u0438\u0441\u044c\u043c\u0430 \u043e\u0442 \u0432\u0430\u0441. <br \/>  \u0421 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e:  <\/p>\n<ul>\n<li>\u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0444\u043e\u0440\u043c\u044b \u0432 \u0431\u0430\u0437\u0443;<\/li>\n<li>\u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0438\u0441\u044c\u043c\u043e \u0430\u0433\u0435\u043d\u0442\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441;<\/li>\n<li>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0449\u0435 \u0441\u0435\u0440\u0432\u0438\u0441, \u0433\u0434\u0435 \u0430\u0433\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043c\u0435\u0447\u0430\u0442\u044c \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0442\u043e\u0439 \u0436\u0435 \u0431\u0430\u0437\u044b (\u043d\u0435 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432 \u0440\u0430\u043c\u043a\u0438 \u0441\u0442\u0430\u0442\u044c\u0438).<\/li>\n<\/ul>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0434\u0435\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 <a href=\"https:\/\/github.com\/Gralll\/aws-sam-contact-us-java11\">GitHub<\/a>.<\/p>\n<h1>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h1>\n<p>  \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432 \u0433\u043e\u043b\u043e\u0432\u0443 \u043f\u0440\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u043e \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u044b:  <\/p>\n<ul>\n<li>\u043c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u0434 back, front, images \u0438 \u0442. \u0434.,<\/li>\n<li>\u043c\u0430\u0448\u0438\u043d\u0430 \u0441 \u0431\u0430\u0437\u043e\u0439,<\/li>\n<li>\u043c\u0430\u0448\u0438\u043d\u0430 \u0441 email-\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c.<\/li>\n<\/ul>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/9a\/7h\/83\/9a7h83iyieeicpht4-bcwy8l-ja.png\"><\/p>\n<p>  \u0411\u044d\u043a \u0438 \u0431\u0430\u0437\u0443, \u043f\u043e-\u0445\u043e\u0440\u043e\u0448\u0435\u043c\u0443, \u043d\u0443\u0436\u043d\u043e \u0440\u0435\u043f\u043b\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u043c \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u043c\u0438\u043d\u0438-\u043c\u0430\u0433\u0430\u0437\u0438\u043d\u0430 \u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u044d\u0442\u0443 \u0444\u043e\u0440\u043c\u0443 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043c\u0430\u0448\u0438\u043d\u044b \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u043e\u0434\u043d\u0443 \u0438 \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0435\u0434\u0438\u043d\u044b\u043c \u043d\u0430\u0431\u043e\u0440\u043e\u043c. <br \/>  \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c Serverless, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0430 \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u0445. <br \/>  \u041a\u0430\u043a \u0431\u044b \u043c\u043d\u043e\u0433\u043e\u043e\u0431\u0435\u0449\u0430\u044e\u0449\u0435 \u043d\u0438 \u0437\u0432\u0443\u0447\u0430\u043b\u043e Serverless, \u0432\u0441\u0435 \u043c\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043d\u0438\u043a\u0443\u0434\u0430 \u043d\u0435 \u0434\u0435\u043b\u0438\u0441\u044c, \u043e\u043d\u0438 \u043b\u0438\u0448\u044c \u0441\u043a\u0440\u044b\u043b\u0438\u0441\u044c \u0438\u0437 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u043b\u044f \u0437\u0440\u0435\u043d\u0438\u044f. \u0418 \u0442\u0435\u043f\u0435\u0440\u044c \u0442\u0443 \u0440\u0443\u0442\u0438\u043d\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443, \u0447\u0442\u043e \u0432\u044b \u043c\u043e\u0433\u043b\u0438 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0432\u0437\u044f\u043b \u043d\u0430 \u0441\u0435\u0431\u044f \u0432\u0430\u0448 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0439 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u0441\u0435 \u0436\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a\u0438\u0435 \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mf\/iw\/6i\/mfiw6if-6nlss4pl-brkgxenxuc.png\"><\/p>\n<p>  \u041d\u0430 \u0434\u0438\u0430\u0433\u0440\u0430\u043c\u043c\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0447\u0435\u0442\u043a\u043e\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430.  <\/p>\n<ul>\n<li>AWS Lambda \u2013 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u0434\/\u043b\u043e\u0433\u0438\u043a\u0443,<\/li>\n<li>S3 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 JS-\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432,<\/li>\n<li>CloudFront \u2013 \u0437\u0430 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u0440\u0435\u0433\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443,<\/li>\n<li>SES \u2013 email-\u0441\u0435\u0440\u0432\u0438\u0441,<\/li>\n<li>DynamoDB \u2013 \u0431\u0430\u0437\u0430 \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0444\u043e\u0440\u043c\u044b (\u043e\u0442 \u043a\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 \u0432\u043e\u043f\u0440\u043e\u0441, \u043a\u0443\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043e\u0442\u0432\u0435\u0442),<\/li>\n<li>API Gateway \u2013 HTTP API \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0439 \u043b\u044f\u043c\u0431\u0434\u044b,<\/li>\n<li>Route53 \u2013 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0435 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f.<\/li>\n<\/ul>\n<p>  \u041d\u0435 \u0432\u0441\u0435 \u044d\u0442\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0433\u0430\u0439\u0434\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0440\u0430\u0441\u0442\u044f\u0433\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e.<br \/>  Route53 \u0438 CloudFront \u2013 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b, \u043f\u0440\u043e \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e.<br \/>  \u041d\u0435\u043c\u043d\u043e\u0436\u043a\u043e \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u043e\u0432, \u0447\u0442\u043e \u043d\u0430\u043c \u0434\u0430\u0441\u0442 \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435:  <\/p>\n<ul>\n<li>\u041c\u044b \u043e\u0442\u0445\u043e\u0434\u0438\u043c \u043e\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 EC2-\u043c\u0430\u0448\u0438\u043d, \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e \u0434\u0435\u0431\u0430\u0433\u0430 \u0447\u0435\u0440\u0435\u0437 ssh,<\/li>\n<li>\u041b\u0435\u0433\u043a\u0430\u044f \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f: \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0442\u0440\u043e\u0442\u0442\u043b\u0438\u043d\u0433 \/ \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \/ \u0434\u043e\u0441\u0442\u0443\u043f\u044b \u0432 \u043e\u0434\u0438\u043d \u043a\u043b\u0438\u043a,<\/li>\n<li>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 access policies: \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0430 \u0438 \u0434\u0430\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f,<\/li>\n<li>\u041b\u043e\u0433\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \/ \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438,<\/li>\n<li>\u041f\u043b\u0430\u0442\u0438\u0442\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \/ \u0440\u0435\u043a\u0432\u0435\u0441\u0442\u044b.<\/li>\n<\/ul>\n<h1>\u0414\u0435\u043c\u043e<\/h1>\n<p>  <\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h2>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043d\u0430\u0448\u0435\u0433\u043e Serverless-\u0440\u0435\u0448\u0435\u043d\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439:  <\/p>\n<ul>\n<li>\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0432 AWS<\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/install-cliv1.html\">aws-cli<\/a><\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/serverless-application-model\/latest\/developerguide\/serverless-sam-cli-install-windows.html\">sam-cli<\/a><\/li>\n<li>JDK 11<\/li>\n<li>Gradle<\/li>\n<\/ul>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0432\u0441\u0435\u0445 \u0432\u044b\u0448\u0435\u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0442\u0443\u043b\u043e\u0432 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448 aws-cli \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a AWS. \u0421\u043b\u0435\u0434\u0443\u0439\u0442\u0435 <a href=\"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-chap-configure.html\">\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>. \u042d\u0442\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438 \u0432\u044b\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e Access Key \u0438 Secret Key.<\/p>\n<h2>\u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/h2>\n<p>  <\/p>\n<h3>1. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u0438\u0437 \u0448\u0430\u0431\u043b\u043e\u043d\u0430<\/h3>\n<p>  \u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e \u0434\u043b\u044f \u0431\u0443\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u0438\u0437 \u043d\u0435\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 SAM CLI. \u0421\u043b\u0435\u0434\u0443\u0439\u0442\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kn\/gu\/7f\/kngu7fr3q_h_7t7bq-ygr7baccs.png\"><\/p>\n<p>  <i>\u0417\u0430\u043c\u0435\u0442\u043a\u0430: \u0412 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 SAM-CLI \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043c\u043e\u0433\u0443\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f, \u043d\u043e \u0432\u0441\u0435 \u043e\u043d\u0438 \u043e\u0441\u0442\u0430\u044e\u0442\u0441\u044f \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c\u0438. \u041f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043d\u0430 \u0442\u0435, \u0447\u0442\u043e \u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u044b\u0448\u0435. \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 \u0442\u0443\u043b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u0435\u0441\u043b\u0438 Gradle \u0432\u0430\u043c \u043d\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442.<\/i><\/p>\n<p>  \u041f\u0440\u043e\u0435\u043a\u0442 \u00abHello, World!\u00bb \u0433\u043e\u0442\u043e\u0432. \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438 \u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c. <\/p>\n<h3>2. \u0417\u0430\u0439\u043c\u0435\u043c\u0441\u044f \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438<\/h3>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0432 build.gradle \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438:  <\/p>\n<pre><code class=\"javascript\">dependencies {     \/\/ AWS     implementation group: 'com.amazonaws.serverless', name: 'aws-serverless-java-container-core', version: '1.4'     implementation group: 'com.amazonaws', name: 'aws-lambda-java-core', version: '1.2.0'     implementation group: 'com.amazonaws', name: 'aws-java-sdk-ses', version: '1.11.670'     implementation group: 'com.amazonaws', name: 'aws-java-sdk-dynamodb', version: '1.11.670'     implementation group: 'com.amazonaws', name: 'aws-lambda-java-log4j2', version: '1.1.0'      \/\/ Utils     implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.10.0'     implementation group: 'commons-io', name: 'commons-io', version: '2.6'      \/\/ Test     testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.1.0'     testImplementation group: 'org.powermock', name: 'powermock-api-mockito2', version: '2.0.4'     testImplementation group: 'org.powermock', name: 'powermock-module-junit4', version: '2.0.4'     testImplementation group: 'junit', name: 'junit', version: '4.12' } <\/code><\/pre>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u2013 \u044d\u0442\u043e AWS SDK. \u041e\u043d\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a SES, DynamoDB \u0438 \u0442.\u0434. <\/p>\n<h3>3. \u041f\u0438\u0448\u0435\u043c \u043b\u044f\u043c\u0431\u0434\u0443<\/h3>\n<p>  <\/p>\n<ul>\n<li>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041c\u0435\u043d\u044f\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0435 \u0440\u0435\u043a\u0432\u0435\u0441\u0442- \u0438 \u0440\u0435\u0441\u043f\u043e\u043d\u0441-\u043a\u043b\u0430\u0441\u0441\u044b \u0434\u043b\u044f RequestHandler \u043d\u0430 AwsProxyRequest \u0438 ContactUsProxyResponse.<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">public class App implements RequestHandler&lt;AwsProxyRequest, ContactUsProxyResponse&gt; ... public ContactUsProxyResponse handleRequest(AwsProxyRequest request, Context context) <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<\/li>\n<li>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043b\u0430\u0441\u0441 AwsClientFactory \u0434\u043b\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 AWS SDK-\u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432.<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">\/**  * Just an util class for an eager initialization of sdk clients.  *\/ public class AwsClientFactory {      private static final Logger LOG = LogManager.getLogger(AwsClientFactory.class);      private final AmazonSimpleEmailService sesClient;     private final DynamoDB dynamoDB;      \/**      * AWS regions should be env variables if you want to generalize the solution.      *\/     AwsClientFactory() {         LOG.debug(&quot;AWS clients factory initialization.&quot;);         sesClient = AmazonSimpleEmailServiceClient.builder().withRegion(Regions.EU_WEST_1).build();         AmazonDynamoDB dynamoDBClient = AmazonDynamoDBClientBuilder.standard().withRegion(Regions.EU_WEST_1).build();         dynamoDB = new DynamoDB(dynamoDBClient);     }      DynamoDB getDynamoDB() {         return dynamoDB;     }      AmazonSimpleEmailService getSesClient() {         return sesClient;     }  } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<\/li>\n<li>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0443 \u0444\u0430\u043a\u0442\u043e\u0440\u0438 \u0438 ObjectMapper \u043a\u0430\u043a \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435.<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\"> private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); private static final AwsClientFactory AWS_CLIENT_FACTORY = new AwsClientFactory(); <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<\/li>\n<li>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u043f\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0435\u043c\u0435\u0439\u043b\u043e\u0432 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044e \u043c\u0435\u0442\u0430\u0434\u0430\u0442\u044b \u0432 \u0431\u0430\u0437\u0443.<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">  private SendEmailResult sendEmail(ContactUsRequest contactUsRequest) {         String emailTemplate = getEmailTemplate();         String email = fillTemplate(emailTemplate, contactUsRequest);          SendEmailRequest sendEmailRequest =                 new SendEmailRequest(                         System.getenv(&quot;SENDER_EMAIL&quot;),                         new Destination(List.of(System.getenv(&quot;RECIPIENT_EMAIL&quot;))),                         new Message()                                 .withSubject(                                         new Content()                                                 .withCharset(UTF_8.name())                                                 .withData(contactUsRequest.getSubject()))                                 .withBody(new Body()                                         .withHtml(new Content()                                                 .withCharset(UTF_8.name())                                                 .withData(email))));         LOG.info(&quot;Email template is ready&quot;);         return AWS_CLIENT_FACTORY.getSesClient().sendEmail(sendEmailRequest); }  private String fillTemplate(String emailTemplate, ContactUsRequest contactUsRequest) {         return String.format(                 emailTemplate,                 contactUsRequest.getUsername(),                 contactUsRequest.getEmail(),                 contactUsRequest.getPhone(),                 contactUsRequest.getQuestion()); }  private String getEmailTemplate() {         try {             return IOUtils.toString(                     Objects.requireNonNull(this.getClass().getClassLoader()                                                .getResourceAsStream(&quot;email_template.html&quot;)),                     UTF_8);         } catch (IOException e) {             throw new RuntimeException(&quot;Loading an email template failed.&quot;, e);         } }  private void addEmailDetailsToDb(ContactUsRequest contactUsRequest, SendEmailResult sendEmailResult) {         AWS_CLIENT_FACTORY.getDynamoDB().getTable(&quot;ContactUsTable&quot;)                           .putItem(new Item()                                   .withPrimaryKey(&quot;Id&quot;, sendEmailResult.getMessageId())                                   .withString(&quot;Subject&quot;, contactUsRequest.getSubject())                                   .withString(&quot;Username&quot;, contactUsRequest.getUsername())                                   .withString(&quot;Phone&quot;, contactUsRequest.getPhone())                                   .withString(&quot;Email&quot;, contactUsRequest.getEmail())                                   .withString(&quot;Question&quot;, contactUsRequest.getQuestion())); } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<\/li>\n<li>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043e\u0442\u0432\u0435\u0442 \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u043e \u0441\u0442\u0430\u0442\u0443\u0441 \u043a\u043e\u0434\u043e\u043c \u0438 \u0442\u0435\u043b\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0430.<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\"> private ContactUsProxyResponse buildResponse(int statusCode, String body) {         ContactUsProxyResponse awsProxyResponse =                 new ContactUsProxyResponse();         awsProxyResponse.setStatusCode(statusCode);         awsProxyResponse.setBody(getBodyAsString(body));         awsProxyResponse.addHeader(CONTENT_TYPE, ContentType.APPLICATION_JSON.toString());         awsProxyResponse.addHeader(&quot;Access-Control-Allow-Origin&quot;, &quot;*&quot;);         return awsProxyResponse; }   private String getBodyAsString(String body) {         try {             return OBJECT_MAPPER.writeValueAsString(new ContactUsResponseBody(body));         } catch (JsonProcessingException e) {             throw new RuntimeException(&quot;Writing ContactUsResponseBody as string failed.&quot;, e);         } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<\/li>\n<li>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u0440\u0435\u0432\u0430 \u043b\u044f\u043c\u0431\u0434\u044b. \u0412 \u043a\u043e\u0434\u0435 \u0431\u043b\u043e\u043a \u043f\u043e\u043c\u0435\u0447\u0435\u043d \u043a\u0430\u043a \u00ab\/\/ WARMING UP\u00bb.<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\"> if (Optional.ofNullable(request.getMultiValueHeaders()).map(headers -&gt; headers.containsKey(&quot;X-WARM-UP&quot;)).orElse(FALSE)) {             LOG.info(&quot;Lambda was warmed up&quot;);             return buildResponse(201, &quot;Lambda was warmed up. V1&quot;); } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<\/li>\n<li>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u0441\u0435 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u0432 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043b\u044f\u043c\u0431\u0434\u044b handleRequest()<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\"> @Override public ContactUsProxyResponse handleRequest(AwsProxyRequest request, Context context) {         LOG.info(&quot;Request was received&quot;);         LOG.debug(getAsPrettyString(request));          if (Optional.ofNullable(request.getMultiValueHeaders()).map(headers -&gt; headers.containsKey(&quot;X-WARM-UP&quot;)).orElse(FALSE)) {             LOG.info(&quot;Lambda was warmed up&quot;);             return buildResponse(201, &quot;Lambda was warmed up. V1&quot;);         }          ContactUsRequest contactUsRequest = getContactUsRequest(request);          SendEmailResult sendEmailResult = sendEmail(contactUsRequest);         LOG.info(&quot;Email was sent&quot;);          addEmailDetailsToDb(contactUsRequest, sendEmailResult);         LOG.info(&quot;DB is updated&quot;);          return buildResponse(200,                 String.format(&quot;Message %s has been sent successfully.&quot;, sendEmailResult.getMessageId())); } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<\/li>\n<\/ul>\n<p>  \u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u0430\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435 \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0441\u0442\u043e\u0438\u0442 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0435\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c. \u0415\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435.<\/p>\n<p>  \u041f\u0435\u0440\u0432\u044b\u0439 \u2013 \u043b\u043e\u0433\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435. \u041e\u0434\u0438\u043d \u0438\u0437 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u043b\u044f\u043c\u0431\u0434\u044b \u0442\u0438\u043f\u0430 Context \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0432 \u0441\u0435\u0431\u0435 \u043e\u0447\u0435\u043d\u044c \u043c\u043d\u043e\u0433\u043e \u0441\u043b\u0443\u0436\u0435\u0431\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043b\u043e\u0433\u0433\u0435\u0440. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043b\u043e\u0433\u0433\u0435\u0440, \u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u043b\u044f\u043c\u0431\u0434\u0430-\u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u044b\u0437\u0432\u0430\u0442\u044c:  <\/p>\n<blockquote><p><code>LambdaLogger logger = context.getLogger(); <\/code><\/p><\/blockquote>\n<p>  \u0412\u0442\u043e\u0440\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u2013 \u043f\u0440\u043e\u0433\u0440\u0435\u0432. \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0433\u043e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043b\u044f\u043c\u0431\u0434\u044b \u2013 \u043b\u0435\u043d\u0438\u0432\u043e\u0435, \u0442\u043e \u0441\u0442\u0430\u0440\u0442 JVM, \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 classpath \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e\u0434\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041f\u0435\u0440\u0432\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043d\u044f\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434, \u0447\u0442\u043e \u043d\u0435 \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 API. \u0414\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u0435\u0432 \u0432\u044b \u0441\u0430\u043c\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c AWS, \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0432 \u0431\u043e\u0435\u0432\u043e\u0439 \u0433\u043e\u0442\u043e\u0432\u043d\u043e\u0441\u0442\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u043e\u0432 \u043b\u044f\u043c\u0431\u0434\u044b. \u041d\u043e \u044d\u0442\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442, \u0447\u0442\u043e\u0431\u044b \u043a\u0442\u043e-\u0442\u043e \u0432\u044b\u0437\u0432\u0430\u043b \u043b\u044f\u043c\u0431\u0434\u0443. \u0415\u0441\u043b\u0438 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0441 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u043a\u043e\u0434\u0430, \u0442\u043e, \u043f\u043e \u0441\u0443\u0442\u0438, \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u043f\u0438\u0441\u044c\u043c\u043e \u0438 \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u0431\u0430\u0437\u0443 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u0435\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435. <br \/>  \u0427\u0442\u043e\u0431\u044b \u044d\u0442\u043e\u0433\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u0435\u043a\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043b\u0438\u0447\u0438\u0442\u044c \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0435\u0432. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043c\u043e\u0436\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0432 \u0437\u0430\u043f\u0440\u043e\u0441. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u00abX-WARM-UP\u00bb \u0441 \u043b\u044e\u0431\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u2013 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u0440\u043e\u0433\u0440\u0435\u0432 \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043b\u0438\u0448\u044c \u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u0442\u0432\u0435\u0442 \u0431\u0435\u0437 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u043d\u0430 \u0447\u0442\u043e \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u043b\u044f\u043c\u0431\u0434\u0430 stateful \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0438 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b. \u0415\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u0447\u0442\u043e \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u043e, \u0438\u0437\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u2013 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c, \u043d\u0435 \u043f\u043e\u043c\u0435\u0448\u0430\u0435\u0442 \u043b\u0438 \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043b\u044f\u043c\u0431\u0434\u044b. \u0422\u0430\u043a\u0436\u0435, \u0435\u0441\u043b\u0438 \u044d\u0442\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438, \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438\u0445 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u043d\u044b\u043c\u0438.<\/p>\n<h3>4. \u041f\u0438\u0448\u0435\u043c \u0442\u0435\u0441\u0442\u044b<\/h3>\n<p>  \u041a\u043e\u0434 \u043b\u044f\u043c\u0431\u0434\u044b \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043a\u0440\u044b\u0442 \u0442\u0435\u043c\u0438 \u0436\u0435 \u0442\u0438\u043f\u0430\u043c\u0438 \u0442\u0435\u0441\u0442\u043e\u0432, \u0447\u0442\u043e \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432. \u041d\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u0440\u0430\u0437\u0440\u0430\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u044f \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u044e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 Serverless \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043f\u043e\u0441\u0432\u044f\u0449\u0435\u043d\u043d\u043e\u0439 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 AWS Lambda. \u0425\u043e\u0442\u044f \u044e\u043d\u0438\u0442 \u0442\u0435\u0441\u0442\u044b \u0443\u0436\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 <a href=\"https:\/\/github.com\/Gralll\/aws-sam-contact-us-java11\/blob\/master\/contact-us-function\/src\/test\/java\/com\/gralll\/sam\/AppTest.java\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a>.<\/p>\n<h3>5. \u041f\u0438\u0448\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d SAM-\u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/h3>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e \u043a\u0430\u043a \u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u043b\u0438 \u043d\u0430\u0448\u0443 \u043b\u044f\u043c\u0431\u0434\u0443 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c SAM-\u0448\u0430\u0431\u043b\u043e\u043d, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0432\u0441\u0435 \u044d\u0442\u0438 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432 AWS.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e SAM<\/b><\/p>\n<div class=\"spoiler_text\">Serverless Application Model \u2013 \u044d\u0442\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 serverless \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u0415\u0441\u043b\u0438 \u043a\u043e\u0440\u043e\u0442\u043a\u043e, \u0442\u043e \u044d\u0442\u043e \u043d\u0435\u043a\u0430\u044f \u043e\u0431\u0435\u0440\u0442\u043a\u0430 \u043d\u0430\u0434 CloudFormation DSL, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u2013 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Lambda, Gateway, DynamoDB \u0438 \u0442. \u0434. <br \/>  SAM, CloudFormation, Terraform \u2013 \u0432\u0441\u0435 \u044d\u0442\u043e <a href=\"https:\/\/en.wikipedia.org\/wiki\/Infrastructure_as_code\">IaC-\u0440\u0435\u0448\u0435\u043d\u0438\u044f<\/a>. SAM \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 Serverless-\u0440\u0435\u0448\u0435\u043d\u0438\u0439, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a Terraform \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0446\u0435\u043b\u0438\u043a\u043e\u043c. <br \/>  \u041f\u0440\u043e Terraform \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/habr.com\/ru\/company\/dins\/blog\/470543\">\u0441\u0442\u0430\u0442\u044c\u044e \u043c\u043e\u0435\u0433\u043e \u043a\u043e\u043b\u043b\u0435\u0433\u0438 \u0438\u0437 DINS<\/a>.  <\/div>\n<\/div>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c, \u0447\u0442\u043e \u0437\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0432 <a href=\"https:\/\/docs.aws.amazon.com\/serverless-application-model\/latest\/developerguide\/sam-specification-resources-and-properties.html\">SAM-\u0448\u0430\u0431\u043b\u043e\u043d\u0435<\/a>.<\/p>\n<p>  <i><b>AWS::Serverless::Function<\/b><\/i><br \/>  \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u0438\u0441\u0442\u0438\u043a\u0438 \u0443\u0436\u0435 \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0437\u0430 \u043d\u0430\u0441, \u0435\u0441\u043b\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 SAM init \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041d\u043e \u0432\u043e\u0442 \u043a\u0430\u043a \u043e\u043d\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0432 \u043c\u043e\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435:  <\/p>\n<pre><code class=\"plaintext\">CodeUri: contact-us-function Handler: com.gralll.sam.App::handleRequest Runtime: java8 MemorySize: 256 <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u0434\u0443\u043c\u0430\u044e \u0432\u0441\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e. <br \/>  <i>CodeUri<\/i> \u2013 \u044d\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u0441 \u043d\u0430\u0448\u0435\u0439 \u043b\u044f\u043c\u0431\u0434\u043e\u0439<br \/>  <i>Handler<\/i> \u2013 \u043f\u043e\u043b\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u043c\u0435\u0442\u043e\u0434\u0430<br \/>  <i>Runtime<\/i> \u2013 \u0442\u043e, \u043d\u0430 \u0447\u0435\u043c \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043b\u044f\u043c\u0431\u0434\u0430<br \/>  <i>MemorySize<\/i> \u2013 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u0441\u0430\u043c\u043e \u0437\u0430 \u0441\u0435\u0431\u044f<\/p>\n<p>  <i><b>\u041a\u0441\u0442\u0430\u0442\u0438 \u043e \u043f\u0430\u043c\u044f\u0442\u0438<\/b>: \u0432 \u043b\u044f\u043c\u0431\u0434\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u0434\u043e 3GB \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u0447\u0442\u043e \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u0443 \u0432 2 CPU. \u0422\u043e \u0435\u0441\u0442\u044c \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c CPU \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u044f\/\u043f\u043e\u043d\u0438\u0436\u0430\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u043c\u044f\u0442\u0438. <\/i><\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0431\u043b\u043e\u043a \u043d\u0443\u0436\u0435\u043d \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u0430 \u0434\u0435\u043f\u043b\u043e\u0439\u043c\u0435\u043d\u0442\u0430.  <\/p>\n<pre><code class=\"plaintext\">AutoPublishAlias: live DeploymentPreference:   Type: Canary10Percent10Minutes <\/code><\/pre>\n<p>  <i>AutoPublishAlias<\/i> \u2013 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u043d\u043e\u0432\u0443\u044e \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0435\u043d\u043d\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e <a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/configuration-aliases.html\">\u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0430\u043b\u0438\u0430\u0441<\/a>. \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c canary-\u0434\u0435\u043f\u043b\u043e\u0439\u043c\u0435\u043d\u0442.<br \/>  <i>Canary10Percent10Minutes<\/i> \u2013 \u0442\u0438\u043f \u0434\u0435\u043f\u043b\u043e\u0439\u043c\u0435\u043d\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0434\u0435\u0440\u0436\u0430\u0442\u044c \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0434\u0432\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043b\u044f\u043c\u0431\u0434\u044b: \u0441\u0442\u0430\u0440\u0443\u044e \u0438 \u043d\u043e\u0432\u0443\u044e, \u043d\u043e \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 10% \u0442\u0440\u0430\u0444\u0438\u043a\u0430. \u0415\u0441\u043b\u0438 \u0437\u0430 \u0434\u0435\u0441\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0435\u0442, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u0440\u0430\u0444\u0438\u043a \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e.<br \/>  \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/github.com\/awslabs\/serverless-application-model\/blob\/master\/docs\/safe_lambda_deployments.rst\">\u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 SAM<\/a>.<\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u0437 \u043a\u043e\u0434\u0430. \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0431\u043b\u043e\u043a \u0434\u043b\u044f \u043b\u044f\u043c\u0431\u0434\u044b:  <\/p>\n<pre><code class=\"plaintext\">Events:   ContactUs:     Type: Api     Properties:       Path: \/contact       Method: post <\/code><\/pre>\n<p>  \u0412 \u043d\u0435\u043c \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u043b\u044f\u043c\u0431\u0434\u044b. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0431\u0443\u0434\u0443\u0442 <a href=\"https:\/\/github.com\/awslabs\/serverless-application-model\/blob\/master\/versions\/2016-10-31.md#api\">API Gateway-\u0437\u0430\u043f\u0440\u043e\u0441\u044b<\/a>.<br \/>  \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f API, \u043d\u043e \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0447\u0442\u043e\u0431\u044b \u043d\u043e\u0432\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 API Gateway \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u043b \u0432\u0441\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0442\u0438\u043f\u0430 <b>POST \/contact<\/b> \u043d\u0430 \u043d\u0430\u0448\u0443 \u043b\u044f\u043c\u0431\u0434\u0443.<\/p>\n<p>  \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0435\u043a\u044c\u044e\u0440\u043d\u044b\u0435 \u0430\u0441\u043f\u0435\u043a\u0442\u044b. \u0418\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u043b\u044f\u043c\u0431\u0434\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043d\u0438 \u043a \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u043d\u0438 \u043a email-\u0441\u0435\u0440\u0432\u0438\u0441\u0443. \u0422\u0430\u043a \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u044f\u0432\u043d\u043e \u043f\u0440\u043e\u043f\u0438\u0441\u0430\u0442\u044c, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 <a href=\"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/access_policies.html\">\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432<\/a> \u0434\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u0432\u043d\u0443\u0442\u0440\u0438 AWS. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Resource-Based Policies:  <\/p>\n<pre><code class=\"plaintext\">Policies:   - AWSLambdaExecute   - Version: '2012-10-17'     Statement:       - Effect: Allow         Action:           - ses:SendEmail           - ses:SendRawEmail         Resource: 'arn:aws:ses:eu-west-1:548476639829:identity\/aleksandrgruzdev11@gmail.com'       - Effect: Allow         Action:           - dynamodb:List*         Resource: '*'       - Effect: Allow         Action:           - dynamodb:Get*           - dynamodb:PutItem           - dynamodb:DescribeTable         Resource: 'arn:aws:dynamodb:*:*:table\/ContactUsTable' <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u0438\u043c\u044f, \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c.<br \/>  \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f SES: \u0432\u044b \u0432\u0438\u0434\u0438\u0442\u0435 \u043c\u043e\u0439 \u0430\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b. \u0412 \u0432\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u0430\u0448 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441. \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0441\u043c\u043e\u0442\u0440\u0438\u0442\u0435 <a href=\"https:\/\/aws.amazon.com\/ru\/getting-started\/tutorials\/send-an-email\">\u0442\u0443\u0442<\/a>.<br \/>  \u0421\u0440\u0430\u0437\u0443 \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 Identity ARN \u044d\u0442\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430, \u043a\u043b\u0438\u043a\u043d\u0443\u0432 \u043f\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443, \u0438 \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0438\u043c \u0435\u043c\u0435\u0439\u043b \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435.<br \/>  \u0421 \u043b\u044f\u043c\u0431\u0434\u043e\u0439 \u0432\u0440\u043e\u0434\u0435 \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b\u0438\u0441\u044c. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0411\u0414.<\/p>\n<p>  <b><i>AWS::Serverless::SimpleTable<\/i><\/b><br \/>  \u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0437\u0430\u0434\u0430\u0447 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 ContactUsTable:  <\/p>\n<pre><code class=\"plaintext\">ContactUsTable:   Type: AWS::Serverless::SimpleTable   Properties:     PrimaryKey:       Name: Id       Type: String     TableName: ContactUsTable     ProvisionedThroughput:       ReadCapacityUnits: 2       WriteCapacityUnits: 2 <\/code><\/pre>\n<p>  \u0418\u0437 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u0435\u0439 \u2013 \u043b\u0438\u0448\u044c Id, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0443\u043a\u0430\u0436\u0435\u043c ReadCapacityUnits \u0438 WriteCapacityUnits. \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u043e\u043c \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u0430\u044f \u0442\u0435\u043c\u0430. \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/docs.amazonaws.cn\/en_us\/amazondynamodb\/latest\/developerguide\/HowItWorks.ReadWriteCapacityMode.html\">\u0442\u0443\u0442<\/a>. \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438 \u043c\u0430\u043b\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 1-2.<\/p>\n<p>  <b><i>Globals<\/i><\/b><br \/>  \u0412 \u044d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0435\u0441\u043b\u0438, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432\u044b \u043e\u0431\u044a\u044f\u0432\u043b\u044f\u0435\u0442\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0442\u0438\u043f\u0430 Function \u0438\u043b\u0438 API.  <\/p>\n<pre><code class=\"plaintext\">Globals:   Function:     Timeout: 15   Api:     Cors:       AllowOrigin: &quot;'*'&quot;       AllowHeaders: &quot;'Content-Type,X-WARM-UP,X-Amz-Date,Authorization,X-Api-Key'&quot; <\/code><\/pre>\n<p>  \u042f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0435\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u0430\u0439\u043c\u0430\u0443\u0442 \u0434\u043b\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 Cors-\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u2013 \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0437\u0436\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c API Gateway \u0441 \u043c\u043e\u0435\u0439 \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0441 ContactUs \u0444\u043e\u0440\u043c\u043e\u0439.<\/p>\n<p>  <b><i>Outputs<\/i><\/b><br \/>  \u042d\u0442\u043e\u0442 \u0431\u043b\u043e\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 AWS CloudFormation.   <\/p>\n<pre><code class=\"plaintext\">Outputs:   ContactUsApi:     Description: &quot;API Gateway endpoint URL for Prod stage for ContactUs function&quot;     Value: !Sub &quot;https:\/\/${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com\/Prod\/contact\/&quot;   ContactUsFunction:     Description: &quot;ContactUs Lambda Function ARN&quot;     Value: !GetAtt ContactUsFunction.Arn   ContactUsFunctionIamRole:     Description: &quot;Implicit IAM Role created for ContactUs function&quot;     Value: !GetAtt ContactUsFunctionRole.Arn <\/code><\/pre>\n<p>  \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 ContactUsApi-\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0434\u0430\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u0430\u043a \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 \u0430\u0434\u0440\u0435\u0441 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e API-\u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442\u0430. <br \/>  \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <b>${ServerlessRestApi}<\/b>, AWS \u0441\u0430\u043c \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442 \u0432 \u0441\u0442\u0440\u043e\u043a\u0443 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043d\u0430\u0448\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e API Gateway. \u0412 \u0438\u0442\u043e\u0433\u0435 \u043b\u044e\u0431\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0438\u043c\u0435\u044e\u0449\u0435\u0435 \u0434\u043e\u0441\u0442\u0443\u043f \u043a CloudFormation, \u0441\u043c\u043e\u0436\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u2013 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0445\u0430\u0440\u0434\u043a\u043e\u0434\u0438\u0442\u044c URL \u0432\u0430\u0448\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432. \u041d\u0443 \u0438 \u0435\u0449\u0435 \u043f\u043b\u044e\u0441 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u0443\u0442\u043f\u0443\u0442\u043e\u0432 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u2013 \u043d\u0435\u043a\u0430\u044f \u043c\u0435\u0442\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0432\u0430\u0448\u0435\u043c \u0441\u0442\u0435\u043a\u0435.<br \/>  \u0421 \u043f\u043e\u043b\u043d\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043a\u0430\u043a\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f <a href=\"https:\/\/docs.aws.amazon.com\/AWSCloudFormation\/latest\/UserGuide\/intrinsic-function-reference.html\">\u0442\u0443\u0442<\/a>.<\/p>\n<p>  <b><i>Parameters<\/i><\/b><br \/>  \u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a\u043e \u0432\u0441\u0435\u043c\u0443 \u0432\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u043c\u0443, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043b\u043e\u043a <a href=\"https:\/\/docs.aws.amazon.com\/AWSCloudFormation\/latest\/UserGuide\/parameters-section-structure.html\">Parameters<\/a>. \u042d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d \u0431\u043e\u043b\u0435\u0435 \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u044b\u043c. \u0412 \u043b\u044e\u0431\u043e\u043c \u0434\u0440\u0443\u0433\u043e\u043c \u0431\u043b\u043e\u043a\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u044d\u0442\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u043d\u0435 \u0445\u0430\u0440\u0434\u043a\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0432 \u043c\u043e\u0435\u043c \u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u044d\u0442\u043e \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u0435\u043c\u0435\u0439\u043b\u044b, SES ARN, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u0442.\u0434.<\/p>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0435\u0441\u044c \u0448\u0430\u0431\u043b\u043e\u043d. \u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0449\u0435 \u043f\u0430\u0440\u0443 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0440\u044f\u0434\u043e\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, S3-\u0431\u0430\u043a\u0435\u0442, \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 CloudFormation-\u0440\u0435\u0441\u0443\u0440\u0441, \u043b\u0438\u0431\u043e \u0432\u043e\u043e\u0431\u0449\u0435 <a href=\"https:\/\/docs.aws.amazon.com\/AWSCloudFormation\/latest\/UserGuide\/template-custom-resources.html\">\u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u0440\u0435\u0441\u0443\u0440\u0441<\/a>.<\/p>\n<h3>6. \u041f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0435\u043c \u043a \u0434\u0435\u043f\u043b\u043e\u0439\u043c\u0435\u043d\u0442\u0443<\/h3>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0448 \u043f\u0440\u043e\u0435\u043a\u0442, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435 Gradle, \u0430 SAM.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0421\u0431\u043e\u0440\u043a\u0430<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">F:\\aws\\projects\\contact-us-sam-app&gt;sam build Building resource 'ContactUsFunction' Running JavaGradleWorkflow:GradleBuild Running JavaGradleWorkflow:CopyArtifacts  Build Succeeded  Built Artifacts  : .aws-sam\\build Built Template   : .aws-sam\\build\\template.yaml  Commands you can use next ========================= [*] Invoke Function: sam local invoke [*] Deploy: sam deploy \u2013guided <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a <i>sam build<\/i> \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438\u0437 \u0440\u0443\u0442\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0431\u0435\u0440\u0435\u0442 \u0432 \u043f\u0430\u043f\u043a\u0443 <i>.aws-sam<\/i> \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0444\u0430\u0439\u043b\u044b: \u043a\u043b\u0430\u0441\u0441\u044b, \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u0448\u0430\u0431\u043b\u043e\u043d SAM.<br \/>  \u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c S3-\u0431\u0430\u043a\u0435\u0442, \u043a\u0443\u0434\u0430 SAM \u0432\u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442 \u0432\u0441\u0435 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b.<br \/>  \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0438\u0431\u043e \u0447\u0435\u0440\u0435\u0437 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u0443\u044e AWS-\u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u043b\u0438\u0431\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439   <\/p>\n<blockquote><p><code>aws s3 mb s3:\/\/bucket-name<\/code><\/p><\/blockquote>\n<p>  <i>\u0417\u0430\u043c\u0435\u0442\u043a\u0430: \u0432\u0441\u0435 \u0431\u0430\u043a\u0435\u0442\u044b \u0441\u043e\u0437\u0434\u0430\u044e\u0442\u0441\u044f \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435, \u0430 \u043e\u043d \u0448\u0430\u0440\u0438\u0442\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0432\u0441\u0435\u043c\u0438 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430\u043c\u0438. \u0422\u0430\u043a \u0447\u0442\u043e \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u0430\u043a\u0435\u0442, \u0435\u0441\u043b\u0438 \u043a\u0442\u043e-\u0442\u043e \u0443\u0436\u0435 \u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043b \u0432 \u0441\u0432\u043e\u0435\u043c \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0435.<\/i><\/p>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0431\u0430\u043a\u0435\u0442 \u0433\u043e\u0442\u043e\u0432, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443:  <\/p>\n<blockquote><p><code>sam package --output-template-file packaged.yaml --s3-bucket &lt;YOUR_BACKET&gt;<\/code><\/p><\/blockquote>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b package<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"bash\">F:\\aws\\projects\\contact-us-sam-app&gt;sam package --output-template-file packaged.yaml --s3-bucket contact-us-sam-app Uploading to ea0c122c06a50d9676fbf9000a80a3bf  9212768 \/ 9212768.0  (100.00%)  Successfully packaged artifacts and wrote output template to file packaged.yaml. Execute the following command to deploy the packaged template sam deploy --template-file F:\\aws\\projects\\contact-us-sam-app\\packaged.yaml --stack-name &lt;YOUR STACK NAME&gt; <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u042f \u0443\u043a\u0430\u0437\u0430\u043b \u0441\u0432\u043e\u0439 \u0431\u0430\u043a\u0435\u0442 contact-us-sam-app, \u0438 SAM \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e. \u0414\u0430\u043b\u0435\u0435 SAM \u0443\u0436\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0442\u0435\u043a \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438, \u0438 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u0432\u0430\u0448\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. \u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0432:  <\/p>\n<blockquote><p><code>sam deploy --template-file packaged.yaml --region eu-west-1 --capabilities CAPABILITY_IAM --stack-name contact-us-sam-app <\/code><\/p><\/blockquote>\n<p>  \u041a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0438\u0434\u0435\u0442\u044c, \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b <i>&#8212;capabilities CAPABILITY_IAM<\/i>. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 CloudFormation \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c IAM-\u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u0418\u043d\u0430\u0447\u0435 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043e\u0448\u0438\u0431\u043a\u0443 InsufficientCapabilities.<br \/>  \u0414\u0430\u043b\u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043b\u043e\u0433 \u0440\u0430\u0431\u043e\u0442\u044b \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b(\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u043a\u043b\u0438\u043a\u0430\u0431\u0435\u043b\u044c\u043d\u0430). \u0422\u0430\u043a\u0438\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438, \u043a\u0430\u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0430\u0443\u0442\u043f\u0443\u0442\u043e\u0432, \u0441\u0442\u0430\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u0439 SAM CLI. <br \/>  <a href=\"https:\/\/habrastorage.org\/webt\/nv\/7p\/4z\/nv7p4zreqati1wd8c8vy3ubuzcm.png\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/nv\/7p\/4z\/nv7p4zreqati1wd8c8vy3ubuzcm.png\"><\/a><\/p>\n<h3>7. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u0442\u0430\u0442\u0443\u0441 CloudFormation<\/h3>\n<p>  \u041c\u043e\u0436\u0435\u043c \u0436\u0434\u0430\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0434\u0435\u043f\u043b\u043e\u0439\u043c\u0435\u043d\u0442\u0430 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438, \u043f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0442\u0435\u043a \u0431\u044b\u043b \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0435\u043d (\u043b\u043e\u0433\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u044b deploy \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0430\u0431\u0437\u0430\u0446\u0435):  <\/p>\n<blockquote><p><code>Successfully created\/updated stack - contact-us-sam-app in eu-west-1<\/code><\/p><\/blockquote>\n<p>  \u041d\u043e \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u0441\u044f\u0442\u044c \u043c\u0438\u043d\u0443\u0442 \u0438\u0437-\u0437\u0430 \u0440\u0435\u0436\u0438\u043c\u0430 canary deployment. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0449\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u0443\u044e \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0437\u0430 \u0441\u0442\u0435\u043a\u043e\u043c \u0442\u0430\u043c.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/97\/ki\/k8\/97kik8apukwxsvqwyvsd_wtmaqo.png\"><br \/>  \u0427\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0441\u0442\u0430\u0442\u0443\u0441 \u0441\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u043d\u0430 <i>CREATE_COMPLETE<\/i>, \u0447\u0442\u043e \u0438 \u0431\u0443\u0434\u0435\u0442 \u043e\u0437\u043d\u0430\u0447\u0430\u0442\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435.<br \/>  \u0412\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 <i>Events<\/i> \u043c\u043e\u0436\u043d\u043e \u0432\u0438\u0434\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0432\u0441\u0435\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u0415\u0441\u043b\u0438 \u0432\u0430\u0448 \u0441\u0442\u0435\u043a \u0437\u0430\u0444\u0435\u0439\u043b\u0438\u0442\u0441\u044f, \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0443\u0442 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043e\u0431 \u043e\u0448\u0438\u0431\u043a\u0430\u0445.<br \/>  \u041a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0442\u0430\u043a\u043e\u0435: <i>UPDATE_FAILED<\/i> \u2013 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435\u0432\u0435\u0440\u043d\u043e \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u0442\u0435 API Gateway \u0432 \u0448\u0430\u0431\u043b\u043e\u043d\u0435.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ce\/mh\/aq\/cemhaqtl6uvdmlvnr0bsvrbokok.png\"><\/p>\n<p>  \u0412\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0435 Resources \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432\u0441\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b. \u041d\u0435 \u0443\u0434\u0438\u0432\u043b\u044f\u0439\u0442\u0435\u0441\u044c \u0438\u0445 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443. \u0425\u043e\u0442\u044f \u043c\u044b \u043e\u0431\u044a\u044f\u0432\u0438\u043b\u0438 \u0432 SAM-\u0448\u0430\u0431\u043b\u043e\u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, CloudFormation \u0441\u043e\u0437\u0434\u0430\u043b \u0437\u0430 \u043d\u0430\u0441 \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432. \u0415\u0441\u043b\u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0438\u0445 Type, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u043e\u043c\u0443 \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u0430\u0442.<br \/>  \u0414\u043b\u044f Api Gateway \u043d\u0435\u044f\u0432\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e:  <\/p>\n<ul>\n<li>ServerlessRestApi<\/li>\n<li>ServerlessRestApiDeployment<\/li>\n<li>ServerlessRestApiProdStage<\/li>\n<\/ul>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0438 \u0434\u043b\u044f \u043b\u044f\u043c\u0431\u0434\u044b \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432.<br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043a\u0440\u043e\u0435\u043c <i>Outputs<\/i> \u0438 \u043d\u0430\u0439\u0434\u0435\u043c URL \u043d\u0430\u0448\u0435\u0433\u043e API. \u0421\u043a\u043e\u043f\u0438\u0440\u0443\u0439\u0442\u0435 \u0435\u0435, \u043e\u043d\u0430 \u043d\u0430\u043c \u0441\u043a\u043e\u0440\u043e \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<h3>8. \u0424\u043e\u0440\u043c\u0430 HTML ContactUs<\/h3>\n<p>  \u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u044f \u0440\u0435\u0448\u0438\u043b \u0434\u0435\u043b\u0430\u0442\u044c ContactUs-\u0444\u043e\u0440\u043c\u0443, \u0438 \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0435\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435.<\/p>\n<p>  <b>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/b><br \/>  \u0427\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e\u0439 \u0444\u043e\u0440\u043c\u044b, \u0442\u043e \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u044f \u0440\u0435\u0448\u0438\u043b \u0432\u0437\u044f\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0443\u044e HTML-\u0444\u043e\u0440\u043c\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0432\u044b\u0437\u043e\u0432\u044b API Gateway \u0447\u0435\u0440\u0435\u0437 ajax. <br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ps\/e-\/4h\/pse-4hta3mojfuamij0dhj3bmyg.png\"><br \/>  \u041a\u0440\u043e\u043c\u0435 \u0441\u0430\u043c\u043e\u0439 \u0444\u043e\u0440\u043c\u044b, \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u0430\u0440\u0443 \u043a\u043d\u043e\u043f\u043e\u043a \u0434\u043b\u044f \u0434\u0435\u0431\u0430\u0433\u0430 \u0438 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f:<br \/>  <i>Set default<\/i> \u2013 \u043f\u043e\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442, \u043a\u0430\u043a \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u044d\u0442\u043e \u0437\u0432\u0443\u0447\u0438\u0442, \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 HTML.  <\/p>\n<pre><code class=\"javascript\">$(&quot;#url-input&quot;).val(&quot;https:\/\/4ykskscuq0.execute-api.eu-west-1.amazonaws.com\/Prod\/contact&quot;); $(&quot;#name-input&quot;).val(&quot;Mike&quot;); $(&quot;#email-input&quot;).val(&quot;Mike@somemail.com&quot;); $(&quot;#phone-input&quot;).val(&quot;+79999999999&quot;); $(&quot;#description-input&quot;).val(&quot;How much does it cost?&quot;); <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u0442\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b, \u043f\u043e\u043c\u0435\u043d\u044f\u0439\u0442\u0435 url-input \u043d\u0430 \u043f\u0443\u0442\u044c \u0434\u043e \u0432\u0430\u0448\u0435\u0433\u043e API Gateway, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u0438\u0437 <i>Outputs<\/i>.<\/p>\n<p>  <b>\u0425\u043e\u0441\u0442\u0438\u043d\u0433<\/b>  <\/p>\n<ul>\n<li>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u044b\u0439 S3-\u0431\u0430\u043a\u0435\u0442.<\/li>\n<li>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c HTML \u0444\u0430\u0439\u043b \u0432 \u0431\u0430\u043a\u0435\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u044f \u043e\u043f\u0446\u0438\u044e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0444\u0430\u0439\u043b \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u043c.<\/li>\n<li>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0431\u0430\u043a\u0435\u0442 \u043a\u0443\u0434\u0430 \u043c\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0438 \u0444\u0430\u0439\u043b.<\/li>\n<li>\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 Properties, \u0434\u0430\u043b\u0435\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c Static website hosting \u0438 \u0432\u0438\u0434\u0438\u043c \u0432\u0430\u0448 \u043d\u043e\u0432\u044b\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 Endpoint.<\/li>\n<\/ul>\n<h3>9. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438<\/h3>\n<p>  <b>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441<\/b><br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 \u043d\u0430 \u0432\u0430\u0448\u0443 \u0444\u043e\u0440\u043c\u0443, \u043d\u0430\u0436\u0430\u0442\u044c Set default \u0438 Send.<br \/>  \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0432\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0437\u0430\u043f\u0440\u043e\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0439\u0434\u0435\u0442 \u0447\u0435\u0440\u0435\u0437 API Gateway \u0434\u043e AWS Lambda.<\/p>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0447\u0435\u0440\u0435\u0437 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435:  <\/p>\n<blockquote><p>Successful: Message 0102016f28b06243-ae897a1e-b805-406b-9987-019f21547682-000000 has been sent successfully.  <\/p><\/blockquote>\n<p>  \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e. \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0432\u0430\u0448 \u043f\u043e\u0447\u0442\u043e\u0432\u044b\u0439 \u044f\u0449\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0432 SAM-\u0442\u0435\u043c\u043f\u043b\u0435\u0439\u0442\u0435. \u0415\u0441\u043b\u0438 \u0432\u044b \u043d\u0435 \u043c\u0435\u043d\u044f\u043b\u0438 \u0448\u0430\u0431\u043b\u043e\u043d \u0442\u043e \u043f\u0438\u0441\u044c\u043c\u043e \u0431\u0443\u0434\u0435\u0442 \u0432 \u0442\u0430\u043a\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/0z\/wy\/sv\/0zwysv5ytv3uzn9fb9az7bsa6lg.png\"><br \/>  \u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0442\u043a\u0440\u044b\u0442\u044c DynamoDB \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043d\u043e\u0432\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c.<\/p>\n<p>  <b>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0445\u043e\u043b\u043e\u0434\u043d\u043e\u0433\u043e \u0441\u0442\u0430\u0440\u0442\u0430<\/b><br \/>  \u042f \u0434\u0443\u043c\u0430\u044e, \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u043b\u0438, \u0447\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0439 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u043f\u0440\u0438\u0448\u043b\u043e \u0447\u0435\u0440\u0435\u0437 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. \u042d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e \u0441\u0435\u0440\u0432\u0438\u0441 AWS Lambda, \u043f\u043e\u043b\u0443\u0447\u0438\u0432 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443, \u043d\u0430\u0447\u0430\u043b \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0430\u043d\u0441 \u0432\u0430\u0448\u0435\u0433\u043e Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0430 \u044d\u0442\u043e \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u043f\u043e\u0434\u043d\u044f\u0442\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 \u0441 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0438 JRE, \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 classpath, \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 \u0443\u0436\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u2013 \u0441\u0442\u0430\u0440\u0442 \u043c\u0435\u0442\u043e\u0434\u0430 <i>handleRequest()<\/i>. \u042d\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0445\u043e\u043b\u043e\u0434\u043d\u044b\u043c \u0441\u0442\u0430\u0440\u0442\u043e\u043c.<\/p>\n<p>  \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437 \u0437\u0430\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0444\u043e\u0440\u043c\u0443. \u041d\u0430 \u044d\u0442\u043e\u0442 \u0440\u0430\u0437 \u043e\u0442\u0432\u0435\u0442 \u043f\u0440\u0438\u0448\u0435\u043b \u043f\u043e\u0447\u0442\u0438 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e, \u0442\u0430\u043a \u0432\u0435\u0434\u044c? \u0415\u0441\u043b\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0432\u044b\u043c \u0438 \u0432\u0442\u043e\u0440\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u043f\u0440\u043e\u0448\u043b\u043e \u0431\u043e\u043b\u0435\u0435 20-30 \u043c\u0438\u043d\u0443\u0442, \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f. <br \/>  \u0421 \u0447\u0435\u043c \u044d\u0442\u043e \u0441\u0432\u044f\u0437\u0430\u043d\u043e? \u0410 \u0441 \u0442\u0435\u043c, \u0447\u0442\u043e AWS Lambda \u043a\u0435\u0448\u0438\u0440\u0443\u0435\u0442 \u0443\u0436\u0435 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0441 \u043b\u044f\u043c\u0431\u0434\u0430\u043c\u0438 \u0434\u043b\u044f \u0438\u0445 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043d\u0438\u0436\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043c\u0435\u0442\u043e\u0434\u0430.<br \/>  \u041d\u0435\u0442 \u0447\u0435\u0442\u043a\u043e\u0433\u043e \u0441\u043e\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f, \u043d\u0430 \u043a\u0430\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043b\u044f\u043c\u0431\u0434\u044b \u043a\u0435\u0448\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0447\u0435\u0433\u043e \u0431\u044b \u0442\u043e \u043d\u0438 \u0431\u044b\u043b\u043e, \u043d\u043e \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u044e\u0434\u0438 \u043e\u043f\u044b\u0442\u043d\u044b\u043c \u043f\u0443\u0442\u0435\u043c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u043b\u0438, \u0447\u0442\u043e \u044d\u0442\u043e <a href=\"https:\/\/read.acloud.guru\/how-long-does-aws-lambda-keep-your-idle-functions-around-before-a-cold-start-bf715d3b810\">\u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438<\/a>. \u0422\u043e \u0435\u0441\u0442\u044c \u043b\u044f\u043c\u0431\u0434\u0430 \u0441 128MB \u043f\u0430\u043c\u044f\u0442\u0438 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0434\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0441 3GB. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0435\u0441\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 \u0440\u0435\u0433\u0438\u043e\u043d, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0430\u0448\u0438 \u043b\u044f\u043c\u0431\u0434\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f, \u043d\u043e \u044d\u0442\u043e \u043d\u0435\u0442\u043e\u0447\u043d\u043e. <br \/>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u0430\u043c\u0438 \u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0439\u0442\u0435 \u0432\u0440\u0435\u043c\u044f \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. <\/p>\n<p>  <b>\u041f\u0440\u043e\u0433\u0440\u0435\u0432<\/b><br \/>  \u041a\u0430\u043a \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043e\u043f\u0446\u0438\u044e, \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0433\u0440\u0435\u0432 \u043b\u044f\u043c\u0431\u0434\u044b. \u0412 \u043a\u043e\u0434\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 <i>X-WAMP-UP-\u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0430<\/i>. \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u043b\u0438\u0447\u0438\u044f \u0442\u0430\u043a\u043e\u0432\u043e\u0433\u043e, \u043b\u044f\u043c\u0431\u0434\u0430 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0442\u0432\u0435\u0442, \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0431\u0438\u0437\u043d\u0435\u0441-\u043b\u043e\u0433\u0438\u043a\u0438, \u043d\u043e \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0433\u043e\u0442\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432.<br \/>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u043b\u044f\u043c\u0431\u0434\u0443, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u043e \u043a\u0440\u043e\u043d-\u0442\u0430\u0439\u043c\u0435\u0440\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f CloudWatch. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u043d\u0435 \u0436\u0435\u043b\u0430\u0435\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043f\u043e\u043f\u0430\u0434\u0430\u043b\u0438 \u043d\u0430 Cold Start. <br \/>  \u0412 HTML-\u0444\u043e\u0440\u043c\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0439\u0442\u0438 \u043a\u043d\u043e\u043f\u043a\u0443 WarmUp mode, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u044d\u0442\u043e\u0442 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0432 \u0437\u0430\u043f\u0440\u043e\u0441. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u0438\u0441\u044c\u043c\u0430, \u043d\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0431\u0430\u0437\u0443 \u043d\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442, \u043d\u043e \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 \u043b\u044f\u043c\u0431\u0434\u044b \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442, \u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u044b\u0437\u043e\u0432 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0437\u0430\u0439\u043c\u0435\u0442 \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<\/p>\n<h1>\u041f\u043e\u0434\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438\u0442\u043e\u0433\u043e\u0432<\/h1>\n<p>  \u0412 \u0445\u043e\u0434\u0435 \u0441\u0442\u0430\u0442\u044c\u0438 \u043c\u044b \u043f\u0440\u043e\u0448\u043b\u0438 \u0432\u0441\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u044d\u0442\u0430\u043f\u044b \u043e\u0442 \u0434\u0438\u0437\u0430\u0439\u043d\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e \u0432\u044b\u0445\u043e\u0434\u0430 \u0435\u0433\u043e \u0432 <i>\u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d<\/i>. <br \/>  \u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u0442\u0435 \u043b\u044e\u0434\u0438, \u043a\u0442\u043e \u0443\u0436\u0435 \u0441\u043b\u044b\u0448\u0430\u043b \u043f\u0440\u043e Serverless \u0438 AWS Lambda, \u043d\u043e \u043d\u0435 \u0438\u043c\u0435\u0432\u0448\u0438\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u043e\u043f\u044b\u0442\u0430, \u0441\u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0433\u0430\u0439\u0434 \u0438 \u0441\u043c\u043e\u0433\u0443\u0442 \u043f\u0440\u043e\u0447\u0443\u0432\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u0434\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 \u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u0440\u0430\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u044d\u0442\u043e\u043c.<\/p>\n<p>  <b>\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430<\/b><br \/>  \u0414\u043b\u044f \u0441\u0435\u0431\u044f \u044f \u0432\u044b\u0434\u0435\u043b\u0438\u043b \u0441\u0430\u043c\u044b\u0435 \u0446\u0435\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430:  <\/p>\n<ul>\n<li>\u042d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 Free Tier \u0438 \u044f \u043c\u043e\u0433\u0443 \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u043e \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438.<\/li>\n<li>\u041e\u0442 \u0438\u043c\u043f\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 \u043b\u044f\u043c\u0431\u0434\u044b \u0434\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0442\u043e\u0442\u0438\u043f\u0430 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u043e\u0439\u0442\u0438 1-2 \u0434\u043d\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0439 \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443\/\u0434\u0435\u043f\u043b\u043e\u0439\u043c\u0435\u043d\u0442.<\/li>\n<li>\u041f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u0430\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u044c, \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0445 \u043f\u0430\u0440\u0430\u0445 \u0434\u0435\u043f\u043b\u043e\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043d\u0442\u0443\u0438\u0442\u0438\u0432\u043d\u043e \u043a\u043b\u0430\u0446\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0438, \u0430 \u043d\u0435 \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u043a\u0438\u043b\u043e\u043c\u0435\u0442\u0440\u043e\u0432\u044b\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b.<\/li>\n<li>\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u044f Serverless \u0438 \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u041f\u043e\u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u0442\u0443\u043b\u044b, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u2014 \u043d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f. \u0422\u043e\u0442 \u0436\u0435 SAM \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u043e\u0433\u0440\u0435\u0441\u0441\u0438\u0440\u0443\u0435\u0442 \u0438 \u0443\u0436\u0435 \u0432\u0437\u044f\u0442 \u043f\u043e\u0434 \u043a\u0440\u044b\u043b\u043e \u0441\u0430\u043c\u0438\u043c AWS. AWS \u0440\u0435\u043b\u0438\u0437\u0438\u0442 \u0430\u043f\u0434\u0435\u0439\u0442\u044b \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u043c\u0438 \u0442\u0435\u043c\u043f\u0430\u043c\u0438, \u0438 \u0442\u043e \u0447\u0442\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e \u043d\u0435\u0434\u0435\u043b\u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e\u043b \u0433\u043e\u0434\u0430 \u043d\u0430\u0437\u0430\u0434, \u0441\u0435\u0439\u0447\u0430\u0441 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u0438\u043d\u0443\u0442\u044b.<\/li>\n<li>\u041e\u0433\u0440\u043e\u043c\u043d\u044b\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0432 Lambda \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u043a.<\/li>\n<li>\u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u043e\u0439 Serverless \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u0430 \u043b\u043e\u0433\u043e\u0432, \u043c\u0435\u0442\u0440\u0438\u043a, \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0438. \u041d\u0435\u0442 \u043d\u0443\u0436\u0434\u044b \u0442\u0440\u0430\u0442\u0438\u0442\u044c \u0434\u0440\u0430\u0433\u043e\u0446\u0435\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043d\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 ELK\/Promethes\/Grafana \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043a \u0442\u0443\u043b\u0430\u043c.<\/li>\n<li>\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a\u0430\u043a \u043a \u0432\u044b\u0437\u043e\u0432\u0443 \u043b\u044f\u043c\u0431\u0434\u044b \u0442\u0430\u043a \u0438 \u043a \u0432\u044b\u0437\u043e\u0432\u0443 \u0432\u0441\u0435\u0433\u043e API. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432 \u043a\u043e\u043c\u0431\u0438\u043d\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u0441\u0430\u043c\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a API Key, \u0442\u0430\u043a \u0438 IAM \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0441\u0435\u0440\u0432\u0438\u0441\u0443 \u0438 \u043d\u0435 \u0431\u043e\u044f\u0442\u044c\u0441\u044f \u0437\u0430 \u043b\u0438\u0448\u043d\u0438\u0435 \u0442\u0440\u0430\u0442\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u043e\u0434\u0438\u043d \u0438\u0437 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u0431\u044b\u043b \u0441\u043a\u043e\u043c\u043f\u0440\u043e\u043c\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u043d.<\/li>\n<li>\u041d\u0443 \u0438 \u0441\u0430\u043c\u043e\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043d\u0430\u0432\u0435\u0440\u043d\u043e, \u044d\u0442\u043e \u2014 Serverless. \u041d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u0443\u043c\u0430\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a\u043e\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441 EC2 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u043b\u0430\u0442\u0438\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a \u043d\u0435\u043c\u0443 \u0434\u043e\u0441\u0442\u0443\u043f\u044b, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u043b\u0435\u0440\u0442\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u0430\u0432\u0442\u043e-\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0438 \u0442.\u0434.<\/li>\n<\/ul>\n<p>  <b>\u041d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043a\u0438<\/b><br \/>  \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u044d\u0442\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0430\u043a \u0447\u0430\u0441\u0442\u044c \u044d\u043d\u0442\u0435\u0440\u043f\u0440\u0430\u0439\u0437 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u043c\u0435\u0441\u0442\u043e \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0432 \u043a\u0443\u0431\u0435\u0440\u0435. \u041e\u0447\u0435\u043d\u044c \u0447\u0430\u0441\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043f\u043d\u0443\u0442\u044c \u0433\u043b\u0443\u0431\u0436\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0435 \u0432 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435. <br \/>  \u0418 \u0443 \u043c\u0435\u043d\u044f \u0442\u0430\u043a\u0436\u0435 \u0438\u043c\u0435\u044e\u0442\u0441\u044f \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u0440\u0438 \u0432\u044b\u0431\u043e\u0440\u0435 Lambda:   <\/p>\n<ul>\n<li>\u0425\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0437\u043d\u0430\u0447\u0438\u043c \u043f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, \u0438 \u0442\u0430\u043a\u0438\u0445 \u044f\u0437\u044b\u043a\u043e\u0432 \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a Java \u0438\u043b\u0438 C#. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0443\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0435\u0432\u043e\u043c, \u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043d\u0430\u0434 \u0442\u0430\u043a\u0438\u043c \u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 \u0438 \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0432\u044b\u0433\u043e\u0434\u044b<\/li>\n<li>\u041e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u0438 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u0443. \u0415\u0441\u043b\u0438 \u0432\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u043f\u0435\u0440\u0435\u0432\u0430\u043b\u0438\u0442\u044c \u0437\u0430 3GB \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438, \u043b\u0438\u0431\u043e \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 2 \u0438 \u0431\u043e\u043b\u0435\u0435 \u044f\u0434\u0440\u0430\u0445, \u0441\u0442\u043e\u0438\u0442 \u043f\u043e\u0434\u0443\u043c\u0430\u0442\u044c \u043d\u0430\u0434 \u0442\u0435\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u044d\u0442\u043e \u0432 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c Fargate, \u043b\u0438\u0431\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043b\u044f\u043c\u0431\u0434, \u043d\u043e \u0442\u0435\u043c \u0441\u0430\u043c\u044b\u043c \u0443\u0441\u043b\u043e\u0436\u043d\u0438\u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443.<\/li>\n<li>\u041a\u043e\u0433\u0434\u0430 \u0443 \u0432\u0430\u0441 \u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043e\u0447\u0435\u043d\u044c \u043d\u0438\u0437\u043a\u0430\u044f \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043d\u0430 API, \u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0435\u0435 \u0432 \u0440\u0430\u0437\u044b, \u0442\u043e \u044f \u0431\u044b \u043f\u0440\u0438\u043a\u0438\u043d\u0443\u043b \u043f\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u043e \u0447\u0442\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0443 \u043a\u043e\u043c\u0430\u043d\u0434\u0435\/\u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043d\u0438\u043a\u0442\u043e \u043a\u0440\u043e\u043c\u0435 1-2 \u0447\u0435\u043b\u043e\u0432\u0435\u043a \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u0441 Serverless, \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u0441\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0438 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0441\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 \u0438 \u0437\u0430\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u044e\u0434\u0435\u0439 \u0435\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c.<\/li>\n<li>\u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0433\u043e\u0442\u043e\u0432\u0430 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438 CI\/CD \u0432 \u043a\u0443\u0431\u0435\u0440\u0435, \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u044f\u0442\u044c \u0436\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u0442\u0438\u0447\u043d\u043e \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u0430\u043c) \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 CI\/CD.<\/li>\n<li>\u041d\u0443 \u0438 \u043a\u0443\u0434\u0430 \u0443\u0436 \u0431\u0435\u0437 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0410 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044f\u043c\u0431\u0434\u0443 \u043d\u0430 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0442\u0440\u0443\u0434\u043d\u043e, \u0432\u0435\u0434\u044c \u044d\u0442\u043e \u0432\u0441\u0435 \u0436\u0435 \u043e\u0442\u043b\u0438\u0447\u0430\u0435\u0442\u0441\u044f \u043e\u0442 \u043e\u0431\u044b\u0447\u043d\u043e\u0433\u043e perfarmance \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0438 \u043d\u0443\u0436\u043d\u043e \u0443\u0447\u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0444\u0430\u043a\u0442\u043e\u0440\u043e\u0432.<\/li>\n<\/ul>\n<p>  <b>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/b><br \/>  \u0412 \u043e\u0431\u0449\u0435\u043c \u0438 \u0446\u0435\u043b\u043e\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 AWS Lambda \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 Serverless \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u043e\u0447\u0435\u043d\u044c \u0445\u043e\u0440\u043e\u0448\u043e \u043b\u043e\u0436\u0438\u0442\u0441\u044f \u043d\u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b async \u0438 event-driven development. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043a\u0430\u043a \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0442\u0430\u043a \u0438 \u043f\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438. \u0412\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u0448\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 Serveress \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0438\u0433\u0440\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0438\u043c\u0443\u044e \u0440\u043e\u043b\u044c:<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/i6\/ov\/y6\/i6ovy6ha2pszsiui5jvyewbf-dk.png\"><\/p>\n<h1>P.S.<\/h1>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a \u0441\u0442\u0430\u0442\u044c\u044f \u0438 \u0442\u0430\u043a \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u0430\u044f, \u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0440\u0430\u0437\u0434\u0443\u0432\u0430\u0442\u044c \u0435\u0435 \u0435\u0449\u0435 \u0431\u043e\u043b\u044c\u0448\u0435, \u044f \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u044e \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043f\u043e\u043a\u0430\u0436\u0443 \u043a\u0430\u043a \u0432\u0435\u0441\u0442\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0435\u0435, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0432\u0441\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 AWS \u043a\u043e\u043d\u0441\u043e\u043b\u0438, SAM \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u0438 \u0434\u0430\u0436\u0435 IntelljIDEA. \u041d\u0443 \u0438 \u0442\u0430\u043a \u043a\u0430\u043a \u044f \u043e\u043f\u0443\u0441\u0442\u0438\u043b \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0442\u043e \u0438 \u044d\u0442\u043e\u0442 \u0430\u0441\u043f\u0435\u043a\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u044e\u0441\u044c \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e. \u0422\u0430\u043a\u0436\u0435 \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f, \u0447\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0438\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b, \u043f\u0438\u0448\u0438\u0442\u0435 \u0441\u043c\u0435\u043b\u043e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438, \u043b\u0438\u0431\u043e \u0432 \u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0436\u043d\u044b\u0435 \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438:  <\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/Gralll\/aws-sam-contact-us-java11\">\u041f\u0440\u043e\u0435\u043a\u0442 \u043d\u0430 GitHub<\/a><\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/install-cliv1.html\">\u0421\u043a\u0430\u0447\u0430\u0442\u044c AWS-CLI<\/a><\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/serverless-application-model\/latest\/developerguide\/serverless-sam-cli-install-windows.html\">\u0421\u043a\u0430\u0447\u0430\u0442\u044c SAM-CLI<\/a><\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/cli\/latest\/userguide\/cli-chap-configure.html\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f AWS-CLI<\/a><\/li>\n<li><a href=\"https:\/\/en.wikipedia.org\/wiki\/Infrastructure_as_code\">Infrastructure as code<\/a><\/li>\n<li><a href=\"https:\/\/habr.com\/ru\/company\/dins\/blog\/470543\">\u041e\u043f\u044b\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Terraform<\/a><\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/serverless-application-model\/latest\/developerguide\/sam-specification-resources-and-properties.html\">\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 SAM \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/a><\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/lambda\/latest\/dg\/configuration-aliases.html\">AWS Lambda Function Aliases<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/awslabs\/serverless-application-model\/blob\/master\/docs\/safe_lambda_deployments.rst\">Advanced Lambda deployment<\/a><\/li>\n<li><a href=\"https:\/\/github.com\/awslabs\/serverless-application-model\/blob\/master\/versions\/2016-10-31.md#awsserverlessapi\">\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f SAM Api \u0440\u0435\u0441\u0443\u0440\u0441\u0430<\/a><\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/IAM\/latest\/UserGuide\/access_policies.html\">AWS IAM \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0438 \u0438 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f<\/a><\/li>\n<li><a href=\"https:\/\/aws.amazon.com\/ru\/getting-started\/tutorials\/send-an-email\/\">\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u043e\u0439 \u043f\u043e\u0447\u0442\u044b SES<\/a><\/li>\n<li><a href=\"https:\/\/docs.amazonaws.cn\/en_us\/amazondynamodb\/latest\/developerguide\/HowItWorks.ReadWriteCapacityMode.html\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 Read\/Write capacity \u0434\u043b\u044f DynamoDB \u0442\u0430\u0431\u043b\u0438\u0446<\/a><\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/AWSCloudFormation\/latest\/UserGuide\/intrinsic-function-reference.html\">SAM\/CloudFormation \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438<\/a><\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/AWSCloudFormation\/latest\/UserGuide\/parameters-section-structure.html\">\u0411\u043b\u043e\u043a Parameters \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u0439\u043c\u0435\u043d\u0442 \u0441\u043a\u0440\u0438\u043f\u0442\u0430<\/a><\/li>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/AWSCloudFormation\/latest\/UserGuide\/template-custom-resources.html\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 CloudFormation \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432<\/a><\/li>\n<li><a href=\"https:\/\/read.acloud.guru\/how-long-does-aws-lambda-keep-your-idle-functions-around-before-a-cold-start-bf715d3b810\">\u0421\u0442\u0430\u0442\u044c\u044f \u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043a\u0435\u0448\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u043e\u0432 \u043f\u043e\u0434 \u043b\u044f\u043c\u0431\u0434\u044b<\/a><\/li>\n<\/ul>\n<\/div>\n<p> \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\/dins\/blog\/486648\/\"> https:\/\/habr.com\/ru\/company\/dins\/blog\/486648\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/company\/dins\/blog\/486648\/\">\u0421\u0442\u0430\u0442\u044c\u044f \u2013 \u0433\u0430\u0439\u0434 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0438 \u0431\u0435\u0437 \u0431\u043e\u043b\u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c AWS Lambda \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435. \u041f\u043e\u0434\u043e\u0439\u0434\u0435\u0442, \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0443, \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0432\u0448\u0435\u043c\u0443 \u0441 Lambda \u0432\u043e\u0432\u0441\u0435, \u0442\u0430\u043a \u0438 \u043f\u043e\u0437\u043d\u0430\u0432\u0448\u0435\u043c\u0443 Cloud, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u043e \u0432\u0438\u0434\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0443 Serverless \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439.<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bd\/y8\/lu\/bdy8luzeox9qq09msokx8yzoba4.jpeg\" alt=\"image\">  <\/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-298532","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298532","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=298532"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/298532\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=298532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=298532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=298532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}