{"id":303039,"date":"2020-05-05T09:00:30","date_gmt":"2020-05-05T09:00:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=303039"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=303039","title":{"rendered":"\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f Aviasales API \u0441 Amazon Kinesis \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u0430 serverless"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/500382\/\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u0410 \u0432\u044b \u043b\u044e\u0431\u0438\u0442\u0435 \u043b\u0435\u0442\u0430\u0442\u044c \u043d\u0430 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430\u0445? \u042f \u043e\u0431\u043e\u0436\u0430\u044e, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u043f\u043e\u043b\u044e\u0431\u0438\u043b \u0435\u0449\u0435 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u2014 Aviasales.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443 Amazon Kinesis, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0441\u0442\u0440\u0438\u043c\u043c\u0438\u043d\u0433\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u0440\u0435\u0430\u043b-\u0442\u0430\u0439\u043c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u043e\u0439, \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c NoSQL \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 Amazon DynamoDB \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 SMS \u043f\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0431\u0438\u043b\u0435\u0442\u0430\u043c. <\/p>\n<p>  \u0412\u0441\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c! \u041f\u043e\u0435\u0445\u0430\u043b\u0438!<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-n\/qn\/yn\/-nqnynmwzv61pmiq2ocatoxseme.jpeg\"><\/div>\n<p>  <a name=\"habracut\"><\/a>  <\/p>\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f \u043a <a href=\"https:\/\/support.travelpayouts.com\/hc\/ru\/sections\/201008338-API-%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D1%85-%D0%BE%D1%82-Aviasales\" rel=\"nofollow\">API Aviasales<\/a>. \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u043d\u0435\u043c\u0443 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u0438 \u0431\u0435\u0437 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0439, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043b\u0438\u0448\u044c \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00ab\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c\u00bb, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0432\u043e\u0439 API \u0442\u043e\u043a\u0435\u043d \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u0434\u0430\u043d\u043d\u044b\u043c.<\/p>\n<blockquote><p>\u041e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0446\u0435\u043b\u044c \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u2014 \u0434\u0430\u0442\u044c \u043e\u0431\u0449\u0435\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0432 AWS, \u043c\u044b \u0432\u044b\u043d\u043e\u0441\u0438\u043c \u0437\u0430 \u0441\u043a\u043e\u0431\u043a\u0438, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u043c API \u043d\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0433\u043e \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043a\u044d\u0448\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0438\u0441\u043a\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u0441\u0430\u0439\u0442\u043e\u0432 Aviasales.ru \u0438 Jetradar.com \u0437\u0430 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 48 \u0447\u0430\u0441\u043e\u0432. <\/p><\/blockquote>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 API \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u0430\u0445 Kinesis-agent, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435-\u043f\u0440\u043e\u0434\u044e\u0441\u0435\u0440\u0435, \u0431\u0443\u0434\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0447\u0435\u0440\u0435\u0437 Kinesis Data Analytics. \u041d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e\u0435 \u0432 DynamoDB \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u00ab\u0441\u044b\u0440\u044b\u0445\u00bb \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u0440\u043e\u0432\u043e\u0434\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0433\u043b\u0443\u0431\u043e\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 BI \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, AWS Quick Sight. <\/p>\n<p>  \u041c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0434\u0435\u043f\u043b\u043e\u044f \u0432\u0441\u0435\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b:<\/p>\n<ul>\n<li>\u0420\u0443\u0447\u043d\u043e\u0439 \u2014 \u0447\u0435\u0440\u0435\u0437 AWS Management Console;<\/li>\n<li>\u0418\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438\u0437 \u043a\u043e\u0434\u0430 Terraform \u2014 \u0434\u043b\u044f \u043b\u0435\u043d\u0438\u0432\u044b\u0445 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432;<\/li>\n<\/ul>\n<h2>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h2>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vt\/ss\/mx\/vtssmx0accvfcphkjvmzwdf4udg.png\"><\/div>\n<p>  \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b:<\/p>\n<ul>\n<li><a href=\"https:\/\/support.travelpayouts.com\/hc\/ru\/articles\/203956163-API-%D0%B4%D0%BE%D1%81%D1%82%D1%83%D0%BF%D0%B0-%D0%BA-%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D0%BC#03\" rel=\"nofollow\"><b>Aviasales API<\/b><\/a> \u2014 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u044b\u0435 \u044d\u0442\u0438\u043c API, \u0431\u0443\u0434\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u044b;<\/li>\n<li><a href=\"https:\/\/aws.amazon.com\/ru\/ec2\/\" rel=\"nofollow\"><b>EC2 Producer Instance<\/b><\/a> \u2014 \u043e\u0431\u044b\u0447\u043d\u0430\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0442\u044c\u0441\u044f \u0432\u0445\u043e\u0434\u043d\u043e\u0439 \u043f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445:<br \/> \n<ul>\n<li><a href=\"https:\/\/docs.aws.amazon.com\/streams\/latest\/dev\/writing-with-agents.html\" rel=\"nofollow\"><b>Kinesis Agent<\/b><\/a> \u2014 \u044d\u0442\u043e Java-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u043e\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0443, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u0431\u043e\u0440\u0430 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 Kinesis (Kinesis Data Streams \u0438\u043b\u0438 Kinesis Firehose). \u0410\u0433\u0435\u043d\u0442 \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0431\u043e\u0440 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f\u0445 \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 Kinesis;<\/li>\n<li><a href=\"https:\/\/github.com\/igorgorbenko\/aviasales_kinesis\/blob\/master\/producer\/api_caller.py\" rel=\"nofollow\"><b>\u0421\u043a\u0440\u0438\u043f\u0442 API Caller<\/b><\/a> \u2014 Python-\u0441\u043a\u0440\u0438\u043f\u0442, \u0434\u0435\u043b\u0430\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043a API \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043e\u0442\u0432\u0435\u0442 \u0432 \u043f\u0430\u043f\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442 Kinesis Agent;<\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/aws.amazon.com\/ru\/kinesis\/data-streams\/\" rel=\"nofollow\"><b>Kinesis Data Streams<\/b><\/a> \u2014 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441 \u0448\u0438\u0440\u043e\u043a\u0438\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f;<\/li>\n<li><a href=\"https:\/\/aws.amazon.com\/ru\/kinesis\/data-analytics\/\" rel=\"nofollow\"><b>Kinesis Analytics<\/b><\/a> \u2014 \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441, \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0449\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. Amazon Kinesis Data Analytics \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043b\u044e\u0431\u044b\u0445 \u043e\u0431\u044a\u0435\u043c\u043e\u0432 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445;<\/li>\n<li><a href=\"https:\/\/aws.amazon.com\/ru\/lambda\/\" rel=\"nofollow\"><b>AWS Lambda<\/b><\/a> \u2014 \u0441\u0435\u0440\u0432\u0438\u0441, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u0434 \u0431\u0435\u0437 \u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432. \u0412\u0441\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u0434 \u043a\u0430\u0436\u0434\u044b\u0439 \u0432\u044b\u0437\u043e\u0432;<\/li>\n<li><a href=\"https:\/\/aws.amazon.com\/ru\/dynamodb\/features\/\" rel=\"nofollow\"><b>Amazon DynamoDB<\/b><\/a> \u2014 \u0431\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440 \u00ab\u043a\u043b\u044e\u0447\u2011\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u00bb \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u043c\u0435\u043d\u0435\u0435 10 \u043c\u0438\u043b\u043b\u0438\u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0432 \u043b\u044e\u0431\u043e\u043c \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0435. \u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 DynamoDB \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u043b\u0438\u0431\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u044b, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u043d\u0430 \u043d\u0438\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0438\u043c\u0438. DynamoDB \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u0442 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u044f \u043e\u0431\u044a\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041d\u0438\u043a\u0430\u043a\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043f\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f;<\/li>\n<li><a href=\"https:\/\/aws.amazon.com\/ru\/sns\/\" rel=\"nofollow\"><b>Amazon SNS<\/b><\/a> \u2014 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438 \u00ab\u0438\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u2014 \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u00bb (Pub\/Sub), \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0438\u043a\u0440\u043e\u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u0431\u0435\u0441\u0441\u0435\u0440\u0432\u0435\u0440\u043d\u044b\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. SNS \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0441\u0441\u044b\u043b\u043a\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 push-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439, SMS-\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u044b\u0445 \u043f\u0438\u0441\u0435\u043c.<\/li>\n<\/ul>\n<h2>\u041d\u0430\u0447\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h2>\n<p>  \u0414\u043b\u044f \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u043f\u043e\u0442\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u044f \u0440\u0435\u0448\u0438\u043b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u0431 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u0430\u0445, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u0443\u044e API Aviasales. \u0412 <a href=\"https:\/\/support.travelpayouts.com\/hc\/ru\/articles\/203956163-API-%D0%B4%D0%BE%D1%81%D1%82%D1%83%D0%BF%D0%B0-%D0%BA-%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D0%BC#03\" rel=\"nofollow\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043e\u0431\u0448\u0438\u0440\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0437\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043e\u0434\u0438\u043d \u0438\u0437 \u043d\u0438\u0445 \u2014 \u00ab\u041a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c \u0446\u0435\u043d \u043d\u0430 \u043c\u0435\u0441\u044f\u0446\u00bb, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0446\u0435\u043d\u044b \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u043c\u0435\u0441\u044f\u0446\u0430, \u0441\u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u043f\u0435\u0440\u0435\u0441\u0430\u0434\u043e\u043a. \u0415\u0441\u043b\u0438 \u043d\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043c\u0435\u0441\u044f\u0446 \u043f\u043e\u0438\u0441\u043a\u0430, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0435\u043d\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0437\u0430 \u043c\u0435\u0441\u044f\u0446, \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u043c.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u0432\u043e\u0439 \u0442\u043e\u043a\u0435\u043d. <br \/>  \u041f\u0440\u0438\u043c\u0435\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0438\u0436\u0435:<\/p>\n<pre><code class=\"bash\">http:\/\/api.travelpayouts.com\/v2\/prices\/month-matrix?currency=rub&amp;origin=LED&amp;destination=HKT&amp;show_to_affiliates=true&amp;token=TOKEN_API<\/code><\/pre>\n<p>  \u0412\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 API \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u0442\u043e\u043a\u0435\u043d\u0430 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c, \u043d\u043e \u043c\u043d\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0441\u043a\u0440\u0438\u043f\u0442\u0435 api_caller.py \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c.<\/p>\n<p>  \u041f\u0440\u0438\u043c\u0435\u0440 \u043e\u0442\u0432\u0435\u0442\u0430:<\/p>\n<pre><code class=\"json\">{{    &quot;success&quot;:true,    &quot;data&quot;:[{       &quot;show_to_affiliates&quot;:true,       &quot;trip_class&quot;:0,       &quot;origin&quot;:&quot;LED&quot;,       &quot;destination&quot;:&quot;HKT&quot;,       &quot;depart_date&quot;:&quot;2015-10-01&quot;,       &quot;return_date&quot;:&quot;&quot;,       &quot;number_of_changes&quot;:1,       &quot;value&quot;:29127,       &quot;found_at&quot;:&quot;2015-09-24T00:06:12+04:00&quot;,       &quot;distance&quot;:8015,       &quot;actual&quot;:true    }] } <\/code><\/pre>\n<p>  \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043e\u0442\u0432\u0435\u0442\u0430 API \u0432\u044b\u0448\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0431\u0438\u043b\u0435\u0442 \u0438\u0437 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430 \u0432 \u041f\u0445\u0443\u043a\u2026 \u042d\u0445, \u0434\u0430 \u0447\u0442\u043e \u043c\u0435\u0447\u0442\u0430\u0442\u044c\u2026 <br \/>  \u0422\u0430\u043a \u043a\u0430\u043a \u044f \u0438\u0437 \u041a\u0430\u0437\u0430\u043d\u0438, \u0430 \u041f\u0445\u0443\u043a\u0435\u0442 \u0441\u0435\u0439\u0447\u0430\u0441 \u00ab\u043d\u0430\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043d\u0438\u0442\u0441\u044f\u00bb, \u043f\u043e\u0438\u0449\u0435\u043c \u0431\u0438\u043b\u0435\u0442\u044b \u0438\u0437 \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0430 \u0432 \u041a\u0430\u0437\u0430\u043d\u044c.<\/p>\n<blockquote><p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u0432 AWS. \u0421\u0440\u0430\u0437\u0443 \u0445\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u043e\u0441\u043e\u0431\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e Kinesis \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439 \u0447\u0435\u0440\u0435\u0437 SMS \u043d\u0435 \u0432\u0445\u043e\u0434\u044f\u0442 \u0432 \u0433\u043e\u0434\u043e\u0432\u043e\u0439 <a href=\"https:\/\/aws.amazon.com\/ru\/free\/\" rel=\"nofollow\">Free Tier (\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435)<\/a>. \u041d\u043e \u0434\u0430\u0436\u0435 \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u044d\u0442\u043e, \u0437\u0430\u043b\u043e\u0436\u0438\u0432 \u0432 \u0443\u043c\u0435 \u043f\u0430\u0440\u0443 \u0434\u043e\u043b\u043b\u0430\u0440\u043e\u0432, \u0432\u043f\u043e\u043b\u043d\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0438 \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c \u0441 \u043d\u0435\u0439. \u0418, \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0436\u0435, \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043e\u043d\u0438 \u0441\u0442\u0430\u043b\u0438 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b.<\/p><\/blockquote>\n<p>  \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, DynamoDb \u0438 \u043b\u044f\u043c\u0431\u0434\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043b\u044f \u043d\u0430\u0441 \u0443\u0441\u043b\u043e\u0432\u043d\u043e \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u043c\u0438, \u0435\u0441\u043b\u0438 \u0443\u043b\u043e\u0436\u0438\u0442\u044c\u0441\u044f \u0432 \u043c\u0435\u0441\u044f\u0447\u043d\u044b\u0435 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435 \u043b\u0438\u043c\u0438\u0442\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f DynamoDB: 25 \u0413\u0431 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430, 25 WCU\/RCU \u0438 100 \u043c\u043b\u043d. \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u0418 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u043b\u044f\u043c\u0431\u0434\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u043c\u0435\u0441\u044f\u0446.<\/p>\n<h2>\u0420\u0443\u0447\u043d\u043e\u0439 \u0434\u0435\u043f\u043b\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b<\/h2>\n<p>  <\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Kinesis Data Streams<\/h3>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u0432 \u0441\u0435\u0440\u0432\u0438\u0441 Kinesis Data Streams \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0432\u0430 \u043d\u043e\u0432\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u0430 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0448\u0430\u0440\u0434\u0443 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0448\u0430\u0440\u0434?<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u0428\u0430\u0440\u0434 \u2014 \u044d\u0442\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0435\u0434\u0438\u043d\u0438\u0446\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u043e\u0442\u043e\u043a\u0430 Amazon Kinesis. \u041e\u0434\u0438\u043d \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e 1 \u041c\u0411\/\u0441 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e 2 \u041c\u0411\/\u0441. \u041e\u0434\u0438\u043d \u0441\u0435\u0433\u043c\u0435\u043d\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u043e 1000 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 PUT \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443. \u041f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043f\u043e\u0442\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u0441 \u0434\u0432\u0443\u043c\u044f \u0441\u0435\u0433\u043c\u0435\u043d\u0442\u0430\u043c\u0438. \u042d\u0442\u043e\u0442 \u043f\u043e\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e 2 \u041c\u0411\/\u0441 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e 4 \u041c\u0411\/\u0441 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u0434\u043e 2000 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 PUT \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443.  <\/div>\n<\/p><\/div>\n<p>  \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0448\u0430\u0440\u0434\u043e\u0432 \u0432 \u0432\u0430\u0448\u0435\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u2014 \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0435\u0433\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c. \u0412 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435, \u0442\u0430\u043a \u0438 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043f\u043e\u0442\u043e\u043a\u0438 \u2014 \u043f\u0443\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0448\u0430\u0440\u0434\u043e\u0432. \u041d\u043e \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0443 \u0432\u0430\u0441 \u0448\u0430\u0440\u0434\u043e\u0432, \u0442\u0435\u043c \u0432\u044b\u0448\u0435 \u0438 \u0446\u0435\u043d\u0430. \u041a\u0430\u0436\u0434\u044b\u0439 \u0448\u0430\u0440\u0434 \u0441\u0442\u043e\u0438\u0442 1,5 \u0446\u0435\u043d\u0442\u0430 \u0432 \u0447\u0430\u0441 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e 1.4 \u0446\u0435\u043d\u0442\u0430 \u0437\u0430 \u043a\u0430\u0436\u0434\u044b\u0435 \u043c\u0438\u043b\u043b\u0438\u043e\u043d \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0432 \u043f\u043e\u0442\u043e\u043a (PUT payload units).<\/p>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <b>airline_tickets<\/b>, \u0435\u043c\u0443 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 1 \u0448\u0430\u0440\u0434\u0430:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/f8\/5p\/jg\/f85pjg59pxlsbjio2_yzpz1wng4.jpeg\"><\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u043e\u0442\u043e\u043a \u0441 \u0438\u043c\u0435\u043d\u0435\u043c <b>special_stream<\/b>:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4l\/_t\/eo\/4l_teoxvvwv5pablkpfnv-tlnac.jpeg\"><\/div>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u043f\u0440\u043e\u0434\u044e\u0441\u0435\u0440\u0430<\/h3>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u043e\u0434\u044e\u0441\u0435\u0440\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 EC2 \u0438\u043d\u0441\u0442\u0430\u043d\u0441. \u042d\u0442\u043e \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043c\u043e\u0449\u043d\u0430\u044f \u0434\u043e\u0440\u043e\u0433\u0430\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430, \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u0441\u043f\u043e\u0442\u043e\u0432\u044b\u0439 t2.micro.<\/p>\n<p>  \u0412\u0430\u0436\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435: \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c image \u2014 Amazon Linux AMI 2018.03.0, \u0441 \u043d\u0438\u043c \u043c\u0435\u043d\u044c\u0448\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0434\u043b\u044f \u0431\u044b\u0441\u0442\u0440\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 Kinesis Agent.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0441\u0435\u0440\u0432\u0438\u0441 EC2, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u044b\u0439 AMI \u0441 \u0442\u0438\u043f\u043e\u043c t2.micro, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0445\u043e\u0434\u0438\u0442 \u0432\u043e Free Tier:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/3q\/rg\/gt\/3qrggtrxqistnkvgzn0bwkfdvbk.jpeg\"><\/div>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u0430\u044f \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430 \u0441\u043c\u043e\u0433\u043b\u0430 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c Kinesis, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u0430\u0442\u044c \u0435\u0439 \u043d\u0430 \u044d\u0442\u043e \u043f\u0440\u0430\u0432\u0430. \u041b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2013 \u043d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c IAM Role. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 Step 3: Configure Instance Details \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c <b>Create new IAM Role<\/b>:<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 IAM \u0440\u043e\u043b\u0438 \u0434\u043b\u044f EC2<\/b>                         <\/p>\n<div class=\"spoiler_text\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/_p\/rm\/xv\/_prmxvgp0iv148grjwdpunwaela.jpeg\"><\/div>\n<p>  \u0412 \u043e\u0442\u043a\u0440\u044b\u0432\u0448\u0435\u043c\u0441\u044f \u043e\u043a\u043d\u0435, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c, \u0447\u0442\u043e \u043d\u043e\u0432\u0443\u044e \u0440\u043e\u043b\u044c \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u043b\u044f EC2 \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b Permissions:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zv\/as\/nn\/zvasnnl8ootjsr6rojjfhmjtfiw.jpeg\"><\/div>\n<p>  \u041d\u0430 \u0443\u0447\u0435\u0431\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0432\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u043e \u0432\u0441\u0435 \u0442\u043e\u043d\u043a\u043e\u0441\u0442\u0438 \u0433\u0440\u0430\u043d\u0443\u043b\u044f\u0440\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043f\u0440\u0430\u0432 \u043d\u0430 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0431\u0435\u0440\u0435\u043c \u043f\u0440\u0435\u0434\u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0410\u043c\u0430\u0437\u043e\u043d\u043e\u043c \u043f\u043e\u043b\u0438\u0441\u0438: AmazonKinesisFullAccess \u0438 CloudWatchFullAccess.<\/p>\n<p>  \u0414\u0430\u0434\u0438\u043c \u043a\u0430\u043a\u043e\u0435-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u0440\u043e\u043b\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: EC2-KinesisStreams-FullAccess. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435, \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043d\u0438\u0436\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/jh\/rj\/38\/jhrj38s8czngu9ri77mu26lh_o0.jpeg\"><\/div>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 \u0440\u043e\u043b\u0438, \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u0438\u0446\u0435\u043f\u0438\u0442\u044c \u0435\u0435 \u043a \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u043c\u0443 \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0443 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yn\/he\/23\/ynhe23lg4gfpfbjvlphntvfypyw.jpeg\"><\/div>\n<p>  \u0411\u043e\u043b\u044c\u0448\u0435 \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u043a\u0440\u0430\u043d\u0435 \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u043c \u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u043a\u043d\u0430\u043c.   <\/div>\n<\/p><\/div>\n<p>  \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0436\u0435\u0441\u0442\u043a\u043e\u0433\u043e \u0434\u0438\u0441\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0442\u044d\u0433\u0438 \u0442\u043e\u0436\u0435 (\u0445\u043e\u0442\u044f, \u0445\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u0433\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u0445\u043e\u0442\u044f \u0431\u044b \u0434\u0430\u0432\u0430\u0442\u044c \u0438\u043c\u044f \u0438\u043d\u0441\u0442\u0430\u043d\u0441\u0443 \u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u043d\u0432\u0430\u0439\u0440\u043e\u043d\u043c\u0435\u043d\u0442).<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043d\u0430 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0435 Step 6: Configure Security Group, \u0433\u0434\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0438\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0438\u043c\u0435\u044e\u0449\u0438\u0439\u0441\u044f \u0443 \u0432\u0430\u0441 S\u0435curity group, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0439 \u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043d\u043d\u0435\u043a\u0442 \u0447\u0435\u0440\u0435\u0437 ssh (\u043f\u043e\u0440\u0442 22) \u043d\u0430 \u0438\u043d\u0441\u0442\u0430\u043d\u0441. \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0430\u043c Source &#8212;&gt; My IP \u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0438\u043d\u0441\u0442\u0430\u043d\u0441.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/y7\/cd\/z9\/y7cdz9fllra7haynrf6gyu0jkdq.jpeg\"><\/div>\n<p>  \u041a\u0430\u043a \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u043d \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u0442 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441 running, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u043d\u0435\u0433\u043e \u0447\u0435\u0440\u0435\u0437 ssh. <\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Kinesis Agent, \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u043d\u0435\u043a\u0442\u0430 \u043a \u043c\u0430\u0448\u0438\u043d\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u0442\u0435\u0440\u043c\u0438\u043d\u0430\u043b\u0435:<\/p>\n<pre><code class=\"bash\">sudo yum -y update sudo yum install -y python36 python36-pip sudo \/usr\/bin\/pip-3.6 install --upgrade pip sudo yum install -y aws-kinesis-agent <\/code><\/pre>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u0432 API:<\/p>\n<pre><code class=\"bash\">sudo mkdir \/var\/log\/airline_tickets<\/code><\/pre>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u0430\u0433\u0435\u043d\u0442\u0430, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0435\u0433\u043e \u043a\u043e\u043d\u0444\u0438\u0433:<\/p>\n<pre><code class=\"bash\">sudo vim \/etc\/aws-kinesis\/agent.json<\/code><\/pre>\n<p>  \u0421\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 agent.json \u0434\u043e\u043b\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0438\u0434:<\/p>\n<pre><code class=\"json\">{   &quot;cloudwatch.emitMetrics&quot;: true,   &quot;kinesis.endpoint&quot;: &quot;&quot;,   &quot;firehose.endpoint&quot;: &quot;&quot;,    &quot;flows&quot;: [     {       &quot;filePattern&quot;: &quot;\/var\/log\/airline_tickets\/*log&quot;,       &quot;kinesisStream&quot;: &quot;airline_tickets&quot;,       &quot;partitionKeyOption&quot;: &quot;RANDOM&quot;,       &quot;dataProcessingOptions&quot;: [          {             &quot;optionName&quot;: &quot;CSVTOJSON&quot;,             &quot;customFieldNames&quot;: [&quot;cost&quot;,&quot;trip_class&quot;,&quot;show_to_affiliates&quot;,                 &quot;return_date&quot;,&quot;origin&quot;,&quot;number_of_changes&quot;,&quot;gate&quot;,&quot;found_at&quot;,                 &quot;duration&quot;,&quot;distance&quot;,&quot;destination&quot;,&quot;depart_date&quot;,&quot;actual&quot;,&quot;record_id&quot;]          }       ]     }   ] } <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0444\u0430\u0439\u043b\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438, \u0430\u0433\u0435\u043d\u0442 \u0431\u0443\u0434\u0435\u0442 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \/var\/log\/airline_tickets\/ \u0444\u0430\u0439\u043b\u044b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .log, \u043f\u0430\u0440\u0441\u0438\u0442\u044c \u0438\u0445 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043f\u043e\u0442\u043e\u043a airline_tickets.<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0438\u0441 \u0438 \u0443\u0431\u0435\u0436\u0434\u0430\u0435\u043c\u0441\u044f, \u0447\u0442\u043e \u043e\u043d \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b\u0441\u044f \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<pre><code class=\"bash\">sudo service aws-kinesis-agent restart<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0441\u043a\u0430\u0447\u0430\u0435\u043c Python-\u0441\u043a\u0440\u0438\u043f\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 API:<\/p>\n<pre><code class=\"bash\">REPO_PATH=https:\/\/raw.githubusercontent.com\/igorgorbenko\/aviasales_kinesis\/master\/producer  wget $REPO_PATH\/api_caller.py -P \/home\/ec2-user\/ wget $REPO_PATH\/requirements.txt -P \/home\/ec2-user\/ sudo chmod a+x \/home\/ec2-user\/api_caller.py sudo \/usr\/local\/bin\/pip3 install -r \/home\/ec2-user\/requirements.txt <\/code><\/pre>\n<p>  \u0421\u043a\u0440\u0438\u043f\u0442 api_caller.py \u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0443 Aviasales \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0432 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 Kinesis agent. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430, \u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441 TicketsApi, \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e \u0434\u0435\u0440\u0433\u0430\u0442\u044c API. \u0412 \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a \u0441 \u0442\u043e\u043a\u0435\u043d\u043e\u043c \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<pre><code class=\"python\">class TicketsApi:     &quot;&quot;&quot;Api caller class.&quot;&quot;&quot;      def __init__(self, headers):         &quot;&quot;&quot;Init method.&quot;&quot;&quot;         self.base_url = BASE_URL         self.headers = headers      async def get_data(self, data):         &quot;&quot;&quot;Get the data from API query.&quot;&quot;&quot;         response_json = {}         async with ClientSession(headers=self.headers) as session:             try:                 response = await session.get(self.base_url, data=data)                 response.raise_for_status()                 LOGGER.info('Response status %s: %s',                             self.base_url, response.status)                 response_json = await response.json()             except HTTPError as http_err:                 LOGGER.error('Oops! HTTP error occurred: %s', str(http_err))             except Exception as err:                 LOGGER.error('Oops! An error ocurred: %s', str(err))             return response_json   def prepare_request(api_token):     &quot;&quot;&quot;Return the headers and query fot the API request.&quot;&quot;&quot;     headers = {'X-Access-Token': api_token,                'Accept-Encoding': 'gzip'}      data = FormData()     data.add_field('currency', CURRENCY)     data.add_field('origin', ORIGIN)     data.add_field('destination', DESTINATION)     data.add_field('show_to_affiliates', SHOW_TO_AFFILIATES)     data.add_field('trip_duration', TRIP_DURATION)     return headers, data   async def main():     &quot;&quot;&quot;Get run the code.&quot;&quot;&quot;     if len(sys.argv) != 2:         print('Usage: api_caller.py &lt;your_api_token&gt;')         sys.exit(1)         return     api_token = sys.argv[1]     headers, data = prepare_request(api_token)      api = TicketsApi(headers)     response = await api.get_data(data)     if response.get('success', None):         LOGGER.info('API has returned %s items', len(response['data']))         try:             count_rows = log_maker(response)             LOGGER.info('%s rows have been saved into %s',                         count_rows,                         TARGET_FILE)         except Exception as e:             LOGGER.error('Oops! Request result was not saved to file. %s',                          str(e))     else:         LOGGER.error('Oops! API request was unsuccessful %s!', response) <\/code><\/pre>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0438 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0430\u0433\u0435\u043d\u0442\u0430 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u0430 api_caller.py:<\/p>\n<pre><code class=\"bash\">sudo .\/api_caller.py TOKEN<\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/u8\/17\/rr\/u817rrbmcgutepqlpx-aa7k2mo4.jpeg\"><\/div>\n<p>  \u0418 \u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043b\u043e\u0433\u0430\u0445 \u0410\u0433\u0435\u043d\u0442\u0430 \u0438 \u043d\u0430 \u0437\u0430\u043a\u043b\u0430\u0434\u043a\u0435 Monitoring \u0432 \u043f\u043e\u0442\u043e\u043a\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 airline_tickets:<\/p>\n<pre><code class=\"bash\">tail -f \/var\/log\/aws-kinesis-agent\/aws-kinesis-agent.log<\/code><\/pre>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ep\/5r\/oy\/ep5royv-vndczuzfhaufx2duuau.jpeg\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/g3\/pi\/ya\/g3piyaltiksnogpxwm0temjdpz4.jpeg\"><\/div>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0438 Kinesis Agent \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043f\u043e\u0442\u043e\u043a. \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c consumer.<\/p>\n<h3>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 Kinesis Data Analytics<\/h3>\n<p>  \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u043c\u0443 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0443 \u0432\u0441\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2014 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 Kinesis Data Analytics \u0441 \u0438\u043c\u0435\u043d\u0435\u043c kinesis_analytics_airlines_app:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dp\/0s\/4a\/dp0s4aesniewnc3j7envuvi2lqa.jpeg\"><\/div>\n<p>  Kinesis Data Analytics \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438\u0437 Kinesis Streams \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u044f\u0437\u044b\u043a\u0430 SQL. \u042d\u0442\u043e \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0432\u0442\u043e\u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 (\u0432 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 Kinesis Streams), \u043a\u043e\u0442\u043e\u0440\u044b\u0439:<\/p>\n<ol>\n<li>\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435 \u043f\u043e\u0442\u043e\u043a\u0438 (Output Stream) \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043a \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0434\u0430\u043d\u043d\u044b\u043c;<\/li>\n<li>\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0442\u043e\u043a \u0441 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0438 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 (Error Stream);<\/li>\n<li>\u0443\u043c\u0435\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 (\u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438).<\/li>\n<\/ol>\n<p>  <\/p>\n<blockquote><p>\u042d\u0442\u043e \u043d\u0435\u0434\u0435\u0448\u0435\u0432\u044b\u0439 \u0441\u0435\u0440\u0432\u0438\u0441 \u2014 0.11 USD \u0437\u0430 \u0447\u0430\u0441 \u0440\u0430\u0431\u043e\u0442\u044b, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438\u043c \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u043e \u0438 \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u043f\u0440\u0438 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p><\/blockquote>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043a \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/2x\/sc\/g6\/2xscg6tquygvrr4dxhjofyxjx-m.jpeg\"><\/div>\n<p>  \u0412\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u043e\u0442\u043e\u043a, \u043a \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043cc\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f (airline_tickets):<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/y1\/c7\/ma\/y1c7ma8a_9n3wwwokqleszry-qa.jpeg\"><\/div>\n<p>  \u0414\u0430\u043b\u0435\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0440\u0438\u0430\u0442\u0442\u0430\u0447\u0438\u0442\u044c \u043d\u043e\u0432\u0443\u044e IAM \u0420\u043e\u043b\u044c \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043c\u043e\u0433\u043b\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u0438\u0437 \u043f\u043e\u0442\u043e\u043a\u0430 \u0438 \u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u043f\u043e\u0442\u043e\u043a. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c \u0432 \u0431\u043b\u043e\u043a\u0435 Access permissions:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/dg\/96\/wq\/dg96wq1hgmmd0ouhxpxs8r0tjss.jpeg\"><\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0440\u043e\u0441\u0438\u043c \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441\u0445\u0435\u043c\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043f\u043e\u0442\u043e\u043a\u0435, \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u00abDiscover schema\u00bb. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0441\u044f (\u0441\u043e\u0437\u0434\u0430\u0441\u0442\u0441\u044f \u043d\u043e\u0432\u0430\u044f) \u0440\u043e\u043b\u044c IAM \u0438 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0441\u0445\u0435\u043c\u044b \u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b\u0438 \u0432 \u043f\u043e\u0442\u043e\u043a:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5e\/co\/6r\/5eco6ro21kgrevovywr-2ulfysw.jpeg\"><\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 SQL. \u041f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043d\u0430 \u044d\u0442\u0443 \u043a\u043d\u043e\u043f\u043a\u0443, \u0432\u044b\u0439\u0434\u0435\u0442 \u043e\u043a\u043d\u043e \u0441 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c \u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u2014 \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kt\/oc\/ta\/ktoctaokxjgsxbosk5eu8-yw_e0.jpeg\"><\/div>\n<p>  \u0412 \u043e\u043a\u043d\u043e \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 SQL \u0432\u0441\u0442\u0430\u0432\u0438\u043c \u0442\u0430\u043a\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c Save and Run SQL:<\/p>\n<pre><code class=\"sql\">CREATE OR REPLACE STREAM &quot;DESTINATION_SQL_STREAM&quot; (&quot;cost&quot; DOUBLE, &quot;gate&quot; VARCHAR(16));  CREATE OR REPLACE PUMP &quot;STREAM_PUMP&quot; AS INSERT INTO &quot;DESTINATION_SQL_STREAM&quot; SELECT STREAM &quot;cost&quot;, &quot;gate&quot; FROM &quot;SOURCE_SQL_STREAM_001&quot; WHERE &quot;cost&quot; &lt; 5000     and &quot;gate&quot; = 'Aeroflot'; <\/code><\/pre>\n<p>  <\/p>\n<blockquote><p>\u0412 \u0440\u0435\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u044b\u0445 \u0431\u0430\u0437\u0430\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u043c\u0438, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b INSERT \u0434\u043b\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 SELECT \u0434\u043b\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 Amazon Kinesis Data Analytics \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 \u043f\u043e\u0442\u043e\u043a\u0430\u043c\u0438 (STREAM) \u0438 \u00ab\u043d\u0430\u0441\u043e\u0441\u0430\u043c\u0438\u00bb (PUMP) \u2014 \u043d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0432\u0441\u0442\u0430\u0432\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043f\u043e\u0442\u043e\u043a\u0430 \u0432 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439 \u043f\u043e\u0442\u043e\u043a. <\/p><\/blockquote>\n<p>  \u0412 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 SQL \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u043f\u043e\u0438\u0441\u043a \u0431\u0438\u043b\u0435\u0442\u043e\u0432 \u0410\u044d\u0440\u043e\u0444\u043b\u043e\u0442\u0430 \u043f\u043e \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0438\u0436\u0435 \u0442\u0440\u0435\u0445 \u0442\u044b\u0441\u044f\u0447 \u0440\u0443\u0431\u043b\u0435\u0439. \u0412\u0441\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0449\u0438\u0435 \u043f\u043e\u0434 \u044d\u0442\u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u043c\u0435\u0449\u0435\u043d\u044b \u0432 \u043f\u043e\u0442\u043e\u043a DESTINATION_SQL_STREAM.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/l7\/zk\/8l\/l7zk8ltrlivhjnmj3u1xcvazwai.jpeg\"><\/div>\n<p>  \u0412 \u0431\u043b\u043e\u043a\u0435 Destination \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u043e\u0442\u043e\u043a special_stream, \u0430 \u0432 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u043c\u0441\u044f \u0441\u043f\u0438\u0441\u043a\u0435 In-application stream name DESTINATION_SQL_STREAM:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5r\/5s\/7r\/5r5s7rpwfezpiyjokrby1jkmcly.jpeg\"><\/div>\n<p>  \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0432\u0441\u0435\u0445 \u043c\u0430\u043d\u0438\u043f\u0443\u043b\u044f\u0446\u0438\u0439 \u0434\u043e\u043b\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0435\u0447\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0435\u0435 \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443 \u043d\u0438\u0436\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4c\/o3\/_b\/4co3_blpb57-arskyc7jwsc2d_i.jpeg\"><\/div>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043d\u0430 \u0442\u043e\u043f\u0438\u043a SNS<\/h3>\n<p>  \u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u0441\u0435\u0440\u0432\u0438\u0441 Simple Notification Service \u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0442\u0430\u043c \u043d\u043e\u0432\u044b\u0439 \u0442\u043e\u043f\u0438\u043a c \u0438\u043c\u0435\u043d\u0435\u043c Airlines:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/su\/ur\/zr\/suurzrkeqmmm7jk3-j5iuqaiar8.jpeg\"><\/div>\n<p>  \u041e\u0444\u043e\u0440\u043c\u043b\u044f\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043d\u0430 \u044d\u0442\u043e\u0442 \u0442\u043e\u043f\u0438\u043a, \u0432 \u043d\u0435\u0439 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u043e\u043c\u0435\u0440 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u044c \u0421\u041c\u0421-\u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u044f:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ep\/gc\/sz\/epgcszgapjrsl4-jhx7vktgi7fi.jpeg\"><\/div>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 DynamoDB<\/h3>\n<p>  \u0414\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0445 \u043f\u043e\u0442\u043e\u043a\u0430 airline_tickets, \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443 \u0432 DynamoDB \u0441 \u0442\u0430\u043a\u0438\u043c \u0436\u0435 \u0438\u043c\u0435\u043d\u0435\u043c. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u0438\u0447\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c record_id:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/t7\/td\/4e\/t7td4eq2asrdur1arxzbmsuthdk.jpeg\"><\/div>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043b\u044f\u043c\u0431\u0434\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 collector<\/h3>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043b\u044f\u043c\u0431\u0434\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u043e\u0434 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435\u043c Collector, \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u0442\u043e\u043a\u0430 airline_tickets \u0438, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0442\u0430\u043c \u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439, \u0432\u0441\u0442\u0430\u0432\u043a\u0430 \u044d\u0442\u0438\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0443 DynamoDB. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043f\u043e\u043c\u0438\u043c\u043e \u043f\u0440\u0430\u0432 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u044d\u0442\u0430 \u043b\u044f\u043c\u0431\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0447\u0442\u0435\u043d\u0438\u044e \u043f\u043e\u0442\u043e\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 Kinesis \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 DynamoDB.<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 IAM \u0440\u043e\u043b\u0438 \u0434\u043b\u044f \u043b\u044f\u043c\u0431\u0434\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 collector<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u0443\u044e IAM \u0440\u043e\u043b\u044c \u0434\u043b\u044f \u043b\u044f\u043c\u0431\u0434\u044b \u0441 \u0438\u043c\u0435\u043d\u0435\u043c Lambda-TicketsProcessingRole:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/s9\/sv\/_f\/s9sv_fh7p4flqdklnzh5rohd9ws.jpeg\"><\/div>\n<p>  \u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u0438\u0441\u0438 AmazonKinesisReadOnlyAccess \u0438 AmazonDynamoDBFullAccess, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043d\u0438\u0436\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/f_\/v0\/zy\/f_v0zyuhd3h9y5e9tiuurfbpqnq.jpeg\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/78\/db\/ge\/78dbgeqrxjuuh6rzlqd-k1qdgee.jpeg\"><\/div>\n<\/div><\/div>\n<p>  \u0414\u0430\u043d\u043d\u0430\u044f \u043b\u044f\u043c\u0431\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0443 \u043e\u0442 Kinesis \u043f\u0440\u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0438 \u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u043f\u043e\u0442\u043e\u043a airline_stream, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u0442\u0440\u0438\u0433\u0433\u0435\u0440:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qt\/h0\/gg\/qth0ggplzpl1afpad4shlgl_tbu.jpeg\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/we\/2c\/ip\/we2cipjv713dvyo10ry4wmyrdi0.jpeg\"><\/div>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u0434 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043b\u044f\u043c\u0431\u0434\u0443.<\/p>\n<pre><code class=\"python\">&quot;&quot;&quot;Parsing the stream and inserting into the DynamoDB table.&quot;&quot;&quot; import base64 import json import boto3 from decimal import Decimal  DYNAMO_DB = boto3.resource('dynamodb') TABLE_NAME = 'airline_tickets'  class TicketsParser:     &quot;&quot;&quot;Parsing info from the Stream.&quot;&quot;&quot;      def __init__(self, table_name, records):         &quot;&quot;&quot;Init method.&quot;&quot;&quot;         self.table = DYNAMO_DB.Table(table_name)         self.json_data = TicketsParser.get_json_data(records)      @staticmethod     def get_json_data(records):         &quot;&quot;&quot;Return deserialized data from the stream.&quot;&quot;&quot;         decoded_record_data = ([base64.b64decode(record['kinesis']['data'])                                 for record in records])         json_data = ([json.loads(decoded_record)                       for decoded_record in decoded_record_data])         return json_data      @staticmethod     def get_item_from_json(json_item):         &quot;&quot;&quot;Pre-process the json data.&quot;&quot;&quot;         new_item = {             'record_id': json_item.get('record_id'),             'cost': Decimal(json_item.get('cost')),             'trip_class': json_item.get('trip_class'),             'show_to_affiliates': json_item.get('show_to_affiliates'),             'origin': json_item.get('origin'),             'number_of_changes': int(json_item.get('number_of_changes')),             'gate': json_item.get('gate'),             'found_at': json_item.get('found_at'),             'duration': int(json_item.get('duration')),             'distance': int(json_item.get('distance')),             'destination': json_item.get('destination'),             'depart_date': json_item.get('depart_date'),             'actual': json_item.get('actual')         }         return new_item      def run(self):         &quot;&quot;&quot;Batch insert into the table.&quot;&quot;&quot;         with self.table.batch_writer() as batch_writer:             for item in self.json_data:                 dynamodb_item = TicketsParser.get_item_from_json(item)                 batch_writer.put_item(dynamodb_item)          print('Has been added ', len(self.json_data), 'items')  def lambda_handler(event, context):     &quot;&quot;&quot;Parse the stream and insert into the DynamoDB table.&quot;&quot;&quot;     print('Got event:', event)     parser = TicketsParser(TABLE_NAME, event['Records'])     parser.run() <\/code><\/pre>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043b\u044f\u043c\u0431\u0434\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 notifier<\/h3>\n<p>  \u0412\u0442\u043e\u0440\u0430\u044f \u043b\u044f\u043c\u0431\u0434\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043e\u0442\u043e\u043a (special_stream) \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435 \u0432 SNS, \u0441\u043e\u0437\u0434\u0430\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e. \u0421\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u044d\u0442\u0430 \u043b\u044f\u043c\u0431\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0438\u043c\u0435\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435 \u0438\u0437 Kinesis \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0439 SNS-\u0442\u043e\u043f\u0438\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0434\u0430\u043b\u0435\u0435 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u043c SNS \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u0435\u043d \u0432\u0441\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0447\u0438\u043a\u0430\u043c \u044d\u0442\u043e\u0433\u043e \u0442\u043e\u043f\u0438\u043a\u0430 (email, SMS \u0438 \u0442.\u0434).<\/p>\n<div class=\"spoiler\" role=\"button\" tabindex=\"0\">                         <b class=\"spoiler_title\">\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 IAM \u0440\u043e\u043b\u0438<\/b>                         <\/p>\n<div class=\"spoiler_text\">\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0435\u043c IAM \u0440\u043e\u043b\u044c Lambda-KinesisAlarm \u0434\u043b\u044f \u044d\u0442\u043e\u0439 \u043b\u044f\u043c\u0431\u0434\u044b, \u0430 \u043f\u043e\u0442\u043e\u043c \u043d\u0430\u0437\u043d\u0430\u0447\u0430\u0435\u043c \u044d\u0442\u0443 \u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0439 \u043b\u044f\u043c\u0431\u0434\u044b alarm_notifier:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/zm\/fn\/ru\/zmfnru75p-tp0y1fqzxaoea2xos.jpeg\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yp\/vp\/u0\/ypvpu0jl74aak54hl-d4wf7r1kc.jpeg\"><\/div>\n<\/div><\/div>\n<p>  \u042d\u0442\u0430 \u043b\u044f\u043c\u0431\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043f\u043e \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0443 \u043d\u0430 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u043e\u0432\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0432 \u043f\u043e\u0442\u043e\u043a special_stream, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0442\u0440\u0438\u0433\u0433\u0435\u0440 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u0442\u043e\u043c\u0443, \u043a\u0430\u043a \u043c\u044b \u044d\u0442\u043e \u0434\u0435\u043b\u0430\u043b\u0438 \u0434\u043b\u044f \u043b\u044f\u043c\u0431\u0434\u044b Collector.<\/p>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u044d\u0442\u043e\u0439 \u043b\u044f\u043c\u0431\u0434\u044b, \u0432\u0432\u0435\u0434\u0435\u043c \u043d\u043e\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u2014 TOPIC_ARN, \u043a\u0443\u0434\u0430 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c ANR (Amazon Recourse Names) \u0442\u043e\u043f\u0438\u043a\u0430 Airlines:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/43\/nn\/qf\/43nnqfmsnahbfu30k5mqadhbuhi.jpeg\"><\/div>\n<p>  \u0418 \u0432\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u0434 \u043b\u044f\u043c\u0431\u0434\u044b, \u043e\u043d \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435\u0441\u043b\u043e\u0436\u043d\u044b\u0439:<\/p>\n<pre><code class=\"python\">import boto3 import base64 import os  SNS_CLIENT = boto3.client('sns') TOPIC_ARN = os.environ['TOPIC_ARN']   def lambda_handler(event, context):     try:         SNS_CLIENT.publish(TopicArn=TOPIC_ARN,                            Message='Hi! I have found an interesting stuff!',                            Subject='Airline tickets alarm')         print('Alarm message has been successfully delivered')     except Exception as err:         print('Delivery failure', str(err)) <\/code><\/pre>\n<p>  \u041a\u0430\u0436\u0435\u0442\u0441\u044f, \u043d\u0430 \u044d\u0442\u043e\u043c \u0440\u0443\u0447\u043d\u0430\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430. \u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e.<\/p>\n<h2>\u0414\u0435\u043f\u043b\u043e\u0439 \u0438\u0437 \u043a\u043e\u0434\u0430 Terraform<\/h2>\n<p>  <\/p>\n<h3>\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h3>\n<p>  <a href=\"https:\/\/www.terraform.io\/intro\/index.html\" rel=\"nofollow\">Terraform<\/a> \u2014 \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u044b\u0439 open-source \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0438\u0437 \u043a\u043e\u0434\u0430. \u0423 \u043d\u0435\u0433\u043e \u0441\u0432\u043e\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0433\u043a\u043e \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432, \u043a\u0430\u043a \u0438 \u0447\u0442\u043e \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c. \u0412 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 Atom \u0438\u043b\u0438 Visual Studio Code \u043c\u043d\u043e\u0433\u043e \u0443\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u043b\u0430\u0433\u0438\u043d\u043e\u0432, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0438\u0445 \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Terraform. <\/p>\n<p>  \u0414\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/www.terraform.io\/downloads.html\" rel=\"nofollow\">\u043e\u0442\u0441\u044e\u0434\u0430<\/a>. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u044b\u0439 \u0440\u0430\u0437\u0431\u043e\u0440 \u0432\u0441\u0435\u0445 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 Terraform \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0440\u0430\u043c\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c\u0438 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u043c\u0438.<\/p>\n<h3>\u041a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c<\/h3>\n<p>  \u041f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043b\u0435\u0436\u0438\u0442 <a href=\"https:\/\/github.com\/igorgorbenko\/aviasales_kinesis\" rel=\"nofollow\">\u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a>. \u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u043a \u0441\u0435\u0431\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. \u041f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d AWS CLI, \u0442.\u043a. Terraform \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043a\u0430\u0442\u044c \u0443\u0447\u0435\u0442\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u0430\u0439\u043b\u0435 ~\/.aws\/credentials.<\/p>\n<p>  \u0425\u043e\u0440\u043e\u0448\u0435\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u0434 \u0434\u0435\u043f\u043b\u043e\u0435\u043c \u0432\u0441\u0435\u0439 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b, \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 plan, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0447\u0442\u043e Terraform \u043d\u0430\u043c \u0441\u0435\u0439\u0447\u0430\u0441 \u043d\u0430\u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435: <\/p>\n<pre><code class=\"bash\">terraform.exe plan<\/code><\/pre>\n<p>  \u0411\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043e \u0432\u0432\u0435\u0441\u0442\u0438 \u043d\u043e\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u043d\u0430 \u043d\u0435\u0433\u043e \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0439. \u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0435\u0433\u043e \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e.<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/e3\/-i\/ps\/e3-ipsgvy03inzbw_26haktayk4.jpeg\"><\/div>\n<p>  \u041f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0432 \u043f\u043b\u0430\u043d \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432:<\/p>\n<pre><code class=\"bash\">terraform.exe apply<\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u044d\u0442\u043e\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043e\u043f\u044f\u0442\u044c \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043d\u043e\u043c\u0435\u0440\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u0430, \u043d\u0430\u0431\u0438\u0440\u0430\u0435\u043c \u00abyes\u00bb, \u043a\u043e\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u043e\u0434\u043d\u044f\u0442\u044c \u0432\u0441\u044e \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443, \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0432\u0441\u044e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 EC2, \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043b\u044f\u043c\u0431\u0434\u0430-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u0442.\u0434.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u0441\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0434 Terraform, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0439\u0442\u0438 \u0432 \u0434\u0435\u0442\u0430\u043b\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f Kinesis Analytics (\u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0438\u0437 \u043a\u043e\u0434\u0430). <\/p>\n<p>  \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qx\/ns\/qc\/qxnsqcjpbkiaradzqomahtxzhnu.jpeg\"><\/div>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u044f\u0432\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c in-application stream name, \u0432\u044b\u0431\u0440\u0430\u0432 \u0438\u0437 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e\u0441\u044f \u0441\u043f\u0438\u0441\u043a\u0430:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ki\/m5\/pl\/kim5plwariaz8bp-qo-qonli4yu.jpeg\"><\/div>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/hg\/69\/kf\/hg69kfwwtwhwkzxlpnb7g3k2ctm.jpeg\"><\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0435 \u0433\u043e\u0442\u043e\u0432\u043e \u043a \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<h2>\u0422\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h2>\n<p>  \u0412\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438, \u043a\u0430\u043a \u0432\u044b \u0434\u0435\u043f\u043b\u043e\u0438\u043b\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u0443, \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0434 Terraform, \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u043d\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e.<\/p>\n<p>  \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u043f\u043e SSH \u043d\u0430 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 EC2, \u0433\u0434\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d Kinesis Agent \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 api_caller.py<\/p>\n<pre><code class=\"bash\">sudo .\/api_caller.py TOKEN<\/code><\/pre>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0436\u0434\u0430\u0442\u044c\u0441\u044f SMS \u043d\u0430 \u0432\u0430\u0448 \u043d\u043e\u043c\u0435\u0440: <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/98\/ui\/mc\/98uimcirxv_n6pglm2qz5jtkvf4.jpeg\"><\/div>\n<p>  SMS \u2014 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u043d\u0430 \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 1 \u043c\u0438\u043d\u0443\u0442\u0443: <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/kg\/u7\/dj\/kgu7djc9xgex84h349dlpfukivg.jpeg\"><\/div>\n<p>  \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 DynamoDB \u0434\u043b\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e, \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430. \u0422\u0430\u0431\u043b\u0438\u0446\u0430 airline_tickets \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/gq\/dj\/vc\/gqdjvcmx0q45o_sgqc_l5po_l-c.jpeg\"><\/div>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  \u0412 \u0445\u043e\u0434\u0435 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u043d\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0431\u044b\u043b\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043e\u043d\u043b\u0430\u0439\u043d-\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0431\u0430\u0437\u0435 Amazon Kinesis. \u0411\u044b\u043b\u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Kinesis Agent \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 Kinesis Data Streams \u0438 \u0440\u0435\u0430\u043b-\u0442\u0430\u0439\u043c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u043e\u0439 Kinesis Analytics \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 SQL \u043a\u043e\u043c\u0430\u043d\u0434, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435 Amazon Kinesis \u0441 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 AWS.<\/p>\n<p>  \u0412\u044b\u0448\u0435\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043c\u044b \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u043b\u0438 \u0434\u0432\u0443\u043c\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438: \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043b\u0433\u0438\u043c \u0440\u0443\u0447\u043d\u044b\u043c \u0438 \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0438\u0437 \u043a\u043e\u0434\u0430 Terraform.<\/p>\n<p>  \u0412\u0435\u0441\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d <a href=\"https:\/\/github.com\/igorgorbenko\/aviasales_kinesis\" rel=\"nofollow\">\u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043d\u0430 GitHub<\/a>, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e \u0441 \u043d\u0438\u043c \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u0421 \u0443\u0434\u043e\u0432\u043e\u043b\u044c\u0441\u0442\u0432\u0438\u0435\u043c \u0433\u043e\u0442\u043e\u0432 \u043e\u0431\u0441\u0443\u0434\u0438\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e, \u0436\u0434\u0443 \u0412\u0430\u0448\u0438\u0445 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432. \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u043d\u0430 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u043a\u0440\u0438\u0442\u0438\u043a\u0443. <\/p>\n<p>  \u0416\u0435\u043b\u0430\u044e \u0443\u0441\u043f\u0435\u0445\u043e\u0432!<\/p><\/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\/post\/500382\/\"> https:\/\/habr.com\/ru\/post\/500382\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/500382\/\">\u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>  \u0410 \u0432\u044b \u043b\u044e\u0431\u0438\u0442\u0435 \u043b\u0435\u0442\u0430\u0442\u044c \u043d\u0430 \u0441\u0430\u043c\u043e\u043b\u0435\u0442\u0430\u0445? \u042f \u043e\u0431\u043e\u0436\u0430\u044e, \u043d\u043e \u043d\u0430 \u0441\u0430\u043c\u043e\u0438\u0437\u043e\u043b\u044f\u0446\u0438\u0438 \u043f\u043e\u043b\u044e\u0431\u0438\u043b \u0435\u0449\u0435 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0431 \u0430\u0432\u0438\u0430\u0431\u0438\u043b\u0435\u0442\u0430\u0445 \u043e\u0434\u043d\u043e\u0433\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u2014 Aviasales.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443 Amazon Kinesis, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0441\u0442\u0440\u0438\u043c\u043c\u0438\u043d\u0433\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441 \u0440\u0435\u0430\u043b-\u0442\u0430\u0439\u043c \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u043e\u0439, \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c NoSQL \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445 Amazon DynamoDB \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043c \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u0447\u0435\u0440\u0435\u0437 SMS \u043f\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u043c \u0431\u0438\u043b\u0435\u0442\u0430\u043c. <\/p>\n<p>  \u0412\u0441\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c! \u041f\u043e\u0435\u0445\u0430\u043b\u0438!<\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-n\/qn\/yn\/-nqnynmwzv61pmiq2ocatoxseme.jpeg\"><\/div>\n<p>  <\/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-303039","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/303039","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=303039"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/303039\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=303039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=303039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=303039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}