{"id":88463,"date":"2020-07-14T13:42:05","date_gmt":"2020-07-14T11:42:05","guid":{"rendered":"https:\/\/prohoster.info\/blog\/administrirovanie\/primer-event-driven-prilozheniya-na-osnove-vebhukov-v-obektnom-s3-hranilishhe-mail-ru-cloud-solutions"},"modified":"2020-07-14T13:42:05","modified_gmt":"2020-07-14T11:42:05","slug":"primer-event-driven-prilozheniya-na-osnove-vebhukov-v-obektnom-s3-hranilishhe-mail-ru-cloud-solutions","status":"publish","type":"post","link":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/primer-event-driven-prilozheniya-na-osnove-vebhukov-v-obektnom-s3-hranilishhe-mail-ru-cloud-solutions","title":{"rendered":"Beispiel f\u00fcr eine ereignisgesteuerte Anwendung auf Basis von Webhooks im S3-Objektspeicher von Mail.ru Cloud Solutions","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><img decoding=\"async\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 event-driven \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c S3-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 Mail.ru Cloud Solutions\" src=\"\/wp-content\/uploads\/2020\/07\/662374a40e7834f7748c2ad055dd9f4a.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<noindex><a rel=\"nofollow\" href=\"https:\/\/www.behance.net\/gallery\/18175033\/Rube-Goldberg-coffee-machine-\"><i>Rube Goldberg coffee machine<\/i><\/a><\/noindex><\/p>\n<p>Event-driven architecture \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0446\u0435\u043d\u043e\u0432\u0443\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0430\u0441\u0441\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 worker-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0418 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043d\u0435 \u043f\u0440\u043e FaaS, \u0430 \u043f\u0440\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0438. \u042f \u043f\u043e\u043a\u0430\u0436\u0443 \u0443\u0447\u0435\u0431\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430.<br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\n\u041f\u0430\u0440\u0430 \u0441\u043b\u043e\u0432 \u043e\u0431 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u0438 \u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0430\u0445. \u041e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435 \u0432 \u0432\u0438\u0434\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043f\u043e S3 \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u043e\u043c\u0443 API (\u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438) \u0447\u0435\u0440\u0435\u0437 HTTP\/HTTPS. \u0412\u0435\u0431\u0445\u0443\u043a\u0438 (webhooks) \u0432 \u043e\u0431\u0449\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u044d\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u0435 \u0432\u044b\u0437\u043e\u0432\u044b \u043f\u043e HTTP. \u041e\u0431\u044b\u0447\u043d\u043e \u043e\u043d\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u044e\u0442\u0441\u044f \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439 \u043a\u043e\u0434\u0430 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438\u043b\u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u043c, \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c\u044b\u043c \u0432 \u0431\u043b\u043e\u0433\u0435. \u041a\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0441\u0430\u0439\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 URL-\u0430\u0434\u0440\u0435\u0441, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0434\u043b\u044f \u0432\u0435\u0431\u0445\u0443\u043a\u0430. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430 \u0434\u0440\u0443\u0433\u043e\u043c (<noindex><a rel=\"nofollow\" href=\"https:\/\/ru.wikipedia.org\/wiki\/Webhook\">wiki<\/a><\/noindex>). \u0412 \u0441\u043b\u0443\u0447\u0430\u0435, \u043a\u043e\u0433\u0434\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0441\u0430\u0439\u0442\u043e\u043c \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u0432 \u0440\u043e\u043b\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0433\u043e.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u043a\u0435\u0439\u0441\u043e\u0432, \u043a\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u043a\u0443\u044e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044e:<\/p>\n<ol>\n<li>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043e\u043f\u0438\u0439 \u0432\u0441\u0435\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435. \u041a\u043e\u043f\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u00ab\u043d\u0430 \u043b\u0435\u0442\u0443\u00bb, \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0438 \u0444\u0430\u0439\u043b\u043e\u0432.<\/li>\n<li>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0438\u0439 \u043c\u0438\u043d\u0438\u0430\u0442\u044e\u0440 \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043e\u0434\u044f\u043d\u044b\u0445 \u0437\u043d\u0430\u043a\u043e\u0432 \u043a \u0444\u043e\u0442\u043e\u0433\u0440\u0430\u0444\u0438\u044f\u043c, \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439.<\/li>\n<li>\u041e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0435 \u043e \u043f\u0440\u0438\u0445\u043e\u0434\u0435 \u043d\u043e\u0432\u044b\u0445 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 (\u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u0431\u0443\u0445\u0433\u0430\u043b\u0442\u0435\u0440\u0441\u043a\u0430\u044f \u0441\u043b\u0443\u0436\u0431\u0430 \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0432 \u043e\u0431\u043b\u0430\u043a\u043e \u043e\u0442\u0447\u0435\u0442\u044b, \u0430 \u0444\u0438\u043d\u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043e \u043d\u043e\u0432\u044b\u0445 \u043e\u0442\u0447\u0435\u0442\u0430\u0445, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0438\u0445).<\/li>\n<li>\u0427\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043a\u0435\u0439\u0441\u044b \u043f\u043e\u0434\u0440\u0430\u0437\u0443\u043c\u0435\u0432\u0430\u044e\u0442, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a Kubernetes, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u043f\u043e\u0434 \u0441 \u043d\u0443\u0436\u043d\u044b\u043c\u0438 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430\u043c\u0438, \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u0432 \u043d\u0435\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0437\u0430\u0434\u0430\u0447\u0438 \u0438 \u043f\u043e\u0441\u043b\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0435\u0442 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440.<\/li>\n<\/ol>\n<p>\n\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0437\u0430\u0434\u0430\u0447\u0438 1, \u043a\u043e\u0433\u0434\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0431\u0430\u043a\u0435\u0442\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 Mail.ru Cloud Solutions (MCS) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 AWS. \u0412 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u043d\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u043c \u043a\u0435\u0439\u0441\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u0443\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438, \u043d\u043e \u0434\u043b\u044f \u0443\u0447\u0435\u0431\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0431\u0435\u0437 \u044d\u0442\u043e\u0433\u043e.<\/p>\n<h3>\u0421\u0445\u0435\u043c\u0430 \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>\n\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d \u0432 <noindex><a rel=\"nofollow\" href=\"https:\/\/mcs.mail.ru\/help\/storage-api\/webhooks-s3\">\u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043f\u043e S3-\u0432\u0435\u0431\u0445\u0443\u043a\u0430\u043c \u043d\u0430 MCS<\/a><\/noindex>. \u0412 \u0441\u0445\u0435\u043c\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u0435\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b:<\/p>\n<ul>\n<li><strong>\u0421\u0435\u0440\u0432\u0438\u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 S3-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u0442 HTTP-\u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u0440\u0438 \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043d\u0438\u0438 webnhook.<\/li>\n<li><strong>\u0421\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0443\u0448\u0430\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043f\u043e HTTP \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f. \u0421\u0435\u0440\u0432\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u043b\u044e\u0431\u043e\u043c \u044f\u0437\u044b\u043a\u0435, \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430 Go.<\/li>\n<\/ul>\n<p>\n\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0432 S3 API \u2014 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438. \u0412 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043d\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 (\u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f\u0445 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u043e\u0431\u044b\u0447\u043d\u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0442\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0443 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f). <\/p>\n<p>\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u043d\u0430 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u043e \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438,<\/li>\n<li>\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f.<\/li>\n<\/ul>\n<p><\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432<\/h3>\n<p>\n\u0414\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u043d\u0443\u0436\u0435\u043d Linux-\u0441\u0435\u0440\u0432\u0435\u0440. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0441\u0442\u0430\u043d\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u0435\u043c \u043d\u0430 MCS.<\/p>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u041f\u041e \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432.<\/p>\n<pre><code class=\"bash\">ubuntu@ubuntu-basic-1-2-10gb:~$ sudo apt-get install git\nReading package lists... Done\nBuilding dependency tree\nReading state information... Done\nThe following packages were automatically installed and are no longer required:\n  bc dns-root-data dnsmasq-base ebtables landscape-common liblxc-common \nliblxc1 libuv1 lxcfs lxd lxd-client python3-attr python3-automat \npython3-click python3-constantly python3-hyperlink\n  python3-incremental python3-pam python3-pyasn1-modules \npython3-service-identity python3-twisted python3-twisted-bin \npython3-zope.interface uidmap xdelta3\nUse 'sudo apt autoremove' to remove them.\nSuggested packages:\n  git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui \ngitk gitweb git-cvs git-mediawiki git-svn\nThe following NEW packages will be installed:\n  git\n0 upgraded, 1 newly installed, 0 to remove and 46 not upgraded.\nNeed to get 3915 kB of archives.\nAfter this operation, 32.3 MB of additional disk space will be used.\nGet:1 http:\/\/MS1.clouds.archive.ubuntu.com\/ubuntu bionic-updates\/main \namd64 git amd64 1:2.17.1-1ubuntu0.7 [3915 kB]\nFetched 3915 kB in 1s (5639 kB\/s)\nSelecting previously unselected package git.\n(Reading database ... 53932 files and directories currently installed.)\nPreparing to unpack ...\/git_1%3a2.17.1-1ubuntu0.7_amd64.deb ...\nUnpacking git (1:2.17.1-1ubuntu0.7) ...\nSetting up git (1:2.17.1-1ubuntu0.7) ...<\/code><\/pre>\n<p>\n\u041a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u043f\u0430\u043f\u043a\u0443 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432:<\/p>\n<pre><code class=\"bash\">ubuntu@ubuntu-basic-1-2-10gb:~$ git clone\nhttps:\/\/github.com\/RomanenkoDenys\/s3-webhook.git\nCloning into 's3-webhook'...\nremote: Enumerating objects: 48, done.\nremote: Counting objects: 100% (48\/48), done.\nremote: Compressing objects: 100% (27\/27), done.\nremote: Total 114 (delta 20), reused 45 (delta 18), pack-reused 66\nReceiving objects: 100% (114\/114), 23.77 MiB | 20.25 MiB\/s, done.\nResolving deltas: 100% (49\/49), done.<\/code><\/pre>\n<p>\n\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre><code class=\"bash\">ubuntu@ubuntu-basic-1-2-10gb:~$ cd s3-webhook\/\nubuntu@ubuntu-basic-1-2-10gb:~\/s3-webhook$ sudo .\/s3-webhook -port 80<\/code><\/pre>\n<p><\/p>\n<h3>\u041f\u043e\u0434\u043f\u0438\u0441\u043a\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438<\/h3>\n<p>\n\u0417\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437 API \u043b\u0438\u0431\u043e web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441. \u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u0440\u0435\u0437 web-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441:<\/p>\n<ol>\n<li><noindex><a rel=\"nofollow\" href=\"https:\/\/mcs.mail.ru\/app\/%20services\/storage\/buckets\/\">\u0418\u0434\u0435\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b \u0431\u0430\u043a\u0435\u0442\u043e\u0432<\/a><\/noindex> \u0432 \u043a\u0430\u0431\u0438\u043d\u0435\u0442\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f.<\/li>\n<li>\u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0431\u0430\u043a\u0435\u0442, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c w\u0435bhooks, \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043d\u0430 \u0448\u0435\u0441\u0442\u0435\u0440\u0435\u043d\u043a\u0443:<\/li>\n<\/ol>\n<p>\n<img decoding=\"async\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 event-driven \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c S3-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 Mail.ru Cloud Solutions\" src=\"\/wp-content\/uploads\/2020\/07\/c35190b975793ed032136240db3e1807.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\n\u041f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 Webhooks \u0438 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c:<\/p>\n<p><img decoding=\"async\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 event-driven \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c S3-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 Mail.ru Cloud Solutions\" src=\"\/wp-content\/uploads\/2020\/07\/f176d0a063d96a61abb494d6fbc66b02.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n\u0417\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u043e\u043b\u044f:<\/p>\n<p><img decoding=\"async\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 event-driven \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c S3-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 Mail.ru Cloud Solutions\" src=\"\/wp-content\/uploads\/2020\/07\/3505f0cf3648e10b29d21cf52b06252f.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>\nID \u2014 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u0430.<\/p>\n<p>Event \u2014 \u043a\u0430\u043a\u0438\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c. \u041c\u044b \u0437\u0430\u0434\u0430\u043b\u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443 \u0432\u0441\u0435\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0442 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 (\u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435).<\/p>\n<p>URL \u2014 \u0430\u0434\u0440\u0435\u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432.<\/p>\n<p>Filter prefix\/suffix \u2014 \u0444\u0438\u043b\u044c\u0442\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0431\u0445\u0443\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u044b, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0447\u0442\u043e\u0431\u044b \u0432\u0435\u0431\u0445\u0443\u043a \u0441\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u044b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c .png, \u0432 <strong>Filter suffix<\/strong> \u043d\u0430\u0434\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u00abpng\u00bb.<\/p>\n<p>\u0412 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u0440\u0442\u044b 80 \u0438 443.<\/p>\n<p>\u041d\u0430\u0436\u043c\u0435\u043c <strong>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c hook<\/strong> \u0438 \u0443\u0432\u0438\u0434\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<p><img decoding=\"async\" alt=\"\u041f\u0440\u0438\u043c\u0435\u0440 event-driven \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c S3-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 Mail.ru Cloud Solutions\" src=\"\/wp-content\/uploads\/2020\/07\/ffa0f21b6d6e6799b11f4dbb12b8d878.jpeg\" style=\"display:block;margin: 0 auto;\" \/><br \/>\nHook \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d. <\/p>\n<p>\u0421\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0432 \u043b\u043e\u0433\u0430\u0445 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0445\u0443\u043a\u0430:<\/p>\n<pre><code class=\"bash\">ubuntu@ubuntu-basic-1-2-10gb:~\/s3-webhook$ sudo .\/s3-webhook -port 80\n2020\/06\/15 12:01:14 [POST] incoming HTTP request from \n95.163.216.92:42530\n2020\/06\/15 12:01:14 Got timestamp: 2020-06-15T15:01:13+03:00 TopicArn: \nmcs5259999770|myfiles-ash|s3:ObjectCreated:*,s3:ObjectRemoved:* Token: \nE2itMqAMUVVZc51pUhFWSp13DoxezvRxkUh5P7LEuk1dEe9y URL: \nhttp:\/\/89.208.199.220\/webhook\n2020\/06\/15 12:01:14 Generate responce signature: \n3754ce36636f80dfd606c5254d64ecb2fd8d555c27962b70b4f759f32c76b66d<\/code><\/pre>\n<p>\n\u0420\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044f \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u0430. \u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u0431\u043e\u043b\u0435\u0435 \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432.<\/p>\n<h3>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432<\/h3>\n<p>\n\u0412 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 Go. \u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b \u0435\u0433\u043e \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<pre><code class=\"go\">package main\n\n\/\/ Generate hmac_sha256_hex\nfunc HmacSha256hex(message string, secret string) string {\n}\n\n\/\/ Generate hmac_sha256\nfunc HmacSha256(message string, secret string) string {\n}\n\n\/\/ Send subscription confirmation\nfunc SubscriptionConfirmation(w http.ResponseWriter, req *http.Request, body []byte) {\n}\n\n\/\/ Send subscription confirmation\nfunc GotRecords(w http.ResponseWriter, req *http.Request, body []byte) {\n}\n\n\/\/ Liveness probe\nfunc Ping(w http.ResponseWriter, req *http.Request) {\n    \/\/ log request\n    log.Printf(&quot;[%s] incoming HTTP Ping request from %sn&quot;, req.Method, req.RemoteAddr)\n    fmt.Fprintf(w, &quot;Pongn&quot;)\n}\n\n\/\/Webhook\nfunc Webhook(w http.ResponseWriter, req *http.Request) {\n}\n\nfunc main() {\n\n    \/\/ get command line args\n    bindPort := flag.Int(&quot;port&quot;, 80, &quot;number between 1-65535&quot;)\n    bindAddr := flag.String(&quot;address&quot;, &quot;&quot;, &quot;ip address in dot format&quot;)\n    flag.StringVar(&amp;actionScript, &quot;script&quot;, &quot;&quot;, &quot;external script to execute&quot;)\n    flag.Parse()\n\n    http.HandleFunc(&quot;\/ping&quot;, Ping)\n    http.HandleFunc(&quot;\/webhook&quot;, Webhook)\n\nlog.Fatal(http.ListenAndServe(*bindAddr+&quot;:&quot;+strconv.Itoa(*bindPort), nil))\n}<\/code><\/pre>\n<p>\n\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ul>\n<li>Ping() \u2014 \u0440\u043e\u0443\u0442, \u043e\u0442\u0432\u0435\u0447\u0430\u044e\u0449\u0438\u0439 \u043f\u043e URL\/ping, \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f liveness probe.<\/li>\n<li>Webhook() \u2014 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0440\u043e\u0443\u0442, \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a URL\/\u0432\u0435\u0431\u0445\u0443\u043a\u0430:\n<ul>\n<li>\u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u0435\u0442 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u044e \u043d\u0430 \u0441\u0435\u0440\u0432\u0438\u0441\u0435 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 (\u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e SubscriptionConfirmation),<\/li>\n<li>\u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u0438 (\u0444\u0443\u043d\u043a\u0446\u0438\u044f Gotrecords).<\/li>\n<\/ul>\n<\/li>\n<li>\u0424\u0443\u043d\u043a\u0446\u0438\u0438 HmacSha256 \u0438 HmacSha256hex \u2014 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f HMAC-SHA256 \u0438 HMAC-SHA256 \u0441 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0432 \u0432\u0438\u0434\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 16-\u0440\u0438\u0447\u043d\u044b\u0445 \u0447\u0438\u0441\u0435\u043b \u0434\u043b\u044f \u043f\u043e\u0434\u0441\u0442\u0447\u0435\u0442\u0430 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u044b.<\/li>\n<li>main \u2014 \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 \u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 URL.<\/li>\n<\/ul>\n<p>\n\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438, \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c:<\/p>\n<ul>\n<li>-port \u2014 \u043f\u043e\u0440\u0442, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c.<\/li>\n<li>-address \u2014 IP-\u0430\u0434\u0440\u0435\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440.<\/li>\n<li>-script \u2014 \u0432\u043d\u0435\u0448\u043d\u044f\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u0439 \u0445\u0443\u043a.<\/li>\n<\/ul>\n<p>\n\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<pre><code class=\"go\">\/\/Webhook\nfunc Webhook(w http.ResponseWriter, req *http.Request) {\n\n    \/\/ Read body\n    body, err := ioutil.ReadAll(req.Body)\n    defer req.Body.Close()\n    if err != nil {\n        http.Error(w, err.Error(), 500)\n        return\n    }\n\n    \/\/ log request\n    log.Printf(&quot;[%s] incoming HTTP request from %sn&quot;, req.Method, req.RemoteAddr)\n    \/\/ check if we got subscription confirmation request\n    if strings.Contains(string(body), \n&quot;&quot;Type&quot;:&quot;SubscriptionConfirmation&quot;&quot;) {\n        SubscriptionConfirmation(w, req, body)\n    } else {\n        GotRecords(w, req, body)\n    }\n\n}<\/code><\/pre>\n<p>\n\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442, \u0447\u0442\u043e \u043f\u0440\u0438\u0448\u043b\u043e \u2014 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043b\u0438\u0431\u043e \u0432\u0435\u0431\u0445\u0443\u043a. \u041a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0437 <noindex><a rel=\"nofollow\" href=\"https:\/\/mcs.mail.ru\/help\/storage-api\/webhooks-s3\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a><\/noindex>, \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 Json \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 Post:<\/p>\n<pre><code class=\"html\">POST http:\/\/test.com HTTP\/1.1\nx-amz-sns-messages-type: SubscriptionConfirmation\ncontent-type: application\/json\n\n{\n    &quot;Timestamp&quot;:&quot;2019-12-26T19:29:12+03:00&quot;,\n    &quot;Type&quot;:&quot;SubscriptionConfirmation&quot;,\n    &quot;Message&quot;:&quot;You have chosen to subscribe to the topic $topic. To confirm the subscription you need to response with calculated signature&quot;,\n    &quot;TopicArn&quot;:&quot;mcs2883541269|bucketA|s3:ObjectCreated:Put&quot;,\n    &quot;SignatureVersion&quot;:1,\n    &quot;Token&quot;:\u00abRPE5UuG94rGgBH6kHXN9FUPugFxj1hs2aUQc99btJp3E49tA\u00bb\n}<\/code><\/pre>\n<p>\n\u041d\u0430 \u044d\u0442\u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c:<\/p>\n<pre><code class=\"html\">content-type: application\/json\n\n{&quot;signature&quot;:\u00abea3fce4bb15c6de4fec365d36bcebbc34ccddf54616d5ca12e1972f82b6d37af\u00bb}<\/code><\/pre>\n<p>\n\u0413\u0434\u0435 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440\u0430 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u043a:<\/p>\n<pre><code class=\"html\">signature = hmac_sha256(url, hmac_sha256(TopicArn, \nhmac_sha256(Timestamp, Token)))<\/code><\/pre>\n<p>\n<noindex><a rel=\"nofollow\" name=\"postreq\"><\/a><\/noindex>\u0415\u0441\u043b\u0438 \u0436\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442 \u0432\u0435\u0431\u0445\u0443\u043a, \u0442\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 Post-\u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"html\">POST &lt;url&gt; HTTP\/1.1\nx-amz-sns-messages-type: SubscriptionConfirmation\n\n{ &quot;Records&quot;:\n    [\n        {\n            &quot;s3&quot;: {\n                &quot;object&quot;: {\n                    &quot;eTag&quot;:&quot;aed563ecafb4bcc5654c597a421547b2&quot;,\n                    &quot;sequencer&quot;:1577453615,\n                    &quot;key&quot;:&quot;some-file-to-bucket&quot;,\n                    &quot;size&quot;:100\n                },\n            &quot;configurationId&quot;:&quot;1&quot;,\n            &quot;bucket&quot;: {\n                &quot;name&quot;: &quot;bucketA&quot;,\n                &quot;ownerIdentity&quot;: {\n                    &quot;principalId&quot;:&quot;mcs2883541269&quot;}\n                },\n                &quot;s3SchemaVersion&quot;:&quot;1.0&quot;\n            },\n            &quot;eventVersion&quot;:&quot;1.0&quot;,\n            &quot;requestParameters&quot;:{\n                &quot;sourceIPAddress&quot;:&quot;185.6.245.156&quot;\n            },\n            &quot;userIdentity&quot;: {\n                &quot;principalId&quot;:&quot;2407013e-cbc1-415f-9102-16fb9bd6946b&quot;\n            },\n            &quot;eventName&quot;:&quot;s3:ObjectCreated:Put&quot;,\n            &quot;awsRegion&quot;:&quot;ru-msk&quot;,\n            &quot;eventSource&quot;:&quot;aws:s3&quot;,\n            &quot;responseElements&quot;: {\n                &quot;x-amz-request-id&quot;:&quot;VGJR5rtJ&quot;\n            }\n        }\n    ]\n}<\/code><\/pre>\n<p>\n\u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435. \u042f \u0432\u044b\u0431\u0440\u0430\u043b \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440\u0430 \u0437\u0430\u043f\u0438\u0441\u044c <code>&quot;Type&quot;:&quot;SubscriptionConfirmation&quot;<\/code>, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u043d\u0430 \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438 \u0438 \u043d\u0435 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0432\u0435\u0431\u0445\u0443\u043a\u0435. \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043d\u0430\u043b\u0438\u0447\u0438\u044f\/\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u044f \u044d\u0442\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0438 \u0432 POST-\u0437\u0430\u043f\u0440\u043e\u0441\u0435, \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442 \u043b\u0438\u0431\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>SubscriptionConfirmation<\/code>, \u043b\u0438\u0431\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>GotRecords<\/code>.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044e SubscriptionConfirmation \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043e\u043d\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u043f\u043e \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0430\u043c, \u0438\u0437\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u043c \u0432 <noindex><a rel=\"nofollow\" href=\"https:\/\/mcs.mail.ru\/help\/storage-api\/webhooks-s3\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a><\/noindex>. \u0418\u0437\u0443\u0447\u0438\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0432 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/RomanenkoDenys\/s3-webhook\/blob\/ac403f77d0f7d4a94e18c459fe8f3c92ee342ae4\/s3-webhook.go#L36\">git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/a><\/noindex>.<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f GotRecords \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0435\u0442 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 Record \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442 (\u0438\u043c\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u044b\u043b\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0435 -script) \u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\u0438\u043c\u044f \u0431\u0430\u043a\u0435\u0442\u0430<\/li>\n<li>\u043a\u043b\u044e\u0447 \u043e\u0431\u044a\u0435\u043a\u0442\u0430<\/li>\n<li>\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435:\n<ul>\n<li>copy \u2014 \u0435\u0441\u043b\u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 EventName = ObjectCreated | PutObject | PutObjectCopy<\/li>\n<li>delete \u2014 \u0435\u0441\u043b\u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 EventName = ObjectRemoved | DeleteObject<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\n\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u043f\u0440\u0438\u043b\u0435\u0442\u0435\u043b \u0445\u0443\u043a c Post-\u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c, \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e <noindex><a rel=\"nofollow\" href=\"#postreq\">\u0432\u044b\u0448\u0435<\/a><\/noindex>, \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 -script=script.sh \u0442\u043e \u0441\u043a\u0440\u0438\u043f\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"html\">script.sh  bucketA some-file-to-bucket copy<\/code><\/pre>\n<p>\n\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u0440\u0438\u0435\u043c\u0430 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u2014 \u044d\u0442\u043e \u043d\u0435 \u0437\u0430\u043a\u043e\u043d\u0447\u0435\u043d\u043d\u043e\u0435 production-\u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u0430 \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u044b<\/h3>\n<p>\n\u0421\u0434\u0435\u043b\u0430\u0435\u043c \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0430\u0446\u0438\u044e \u0444\u0430\u0439\u043b\u043e\u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0431\u0430\u043a\u0435\u0442\u0430 \u0432 MCS \u0432 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0439 \u0431\u0430\u043a\u0435\u0442 \u0432 AWS. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0431\u0430\u043a\u0435\u0442 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f myfiles-ash, \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u044b\u0439 \u2014 myfiles-backup (\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0431\u0430\u043a\u0435\u0442\u0430 \u0432 AWS \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438). \u0421\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0444\u0430\u0439\u043b \u043a\u043b\u0430\u0434\u0435\u0442\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u0431\u0430\u043a\u0435\u0442, \u0435\u0433\u043e \u043a\u043e\u043f\u0438\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u044f\u0432\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0443\u0434\u0430\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u2014 \u0443\u0434\u0430\u043b\u044f\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0437\u0435\u0440\u0432\u043d\u043e\u043c.<\/p>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0431\u0430\u043a\u0435\u0442\u0430\u043c\u0438 \u0431\u0443\u0434\u0435\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 awscli, \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e \u043a\u0430\u043a \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 MCS, \u0442\u0430\u043a \u0438 \u043e\u0431\u043b\u0430\u0447\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 AWS.<\/p>\n<pre><code class=\"bash\">ubuntu@ubuntu-basic-1-2-10gb:~$ sudo apt-get install awscli\nReading package lists... Done\nBuilding dependency tree\nReading state information... Done\nAfter this operation, 34.4 MB of additional disk space will be used.\nUnpacking awscli (1.14.44-1ubuntu1) ...\nSetting up awscli (1.14.44-1ubuntu1) ...<\/code><\/pre>\n<p>\n\u0421\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a API S3 MCS:<\/p>\n<pre><code class=\"bash\">ubuntu@ubuntu-basic-1-2-10gb:~$ aws configure --profile mcs\nAWS Access Key ID [None]: hdywEPtuuJTExxxxxxxxxxxxxx\nAWS Secret Access Key [None]: hDz3SgxKwXoxxxxxxxxxxxxxxxxxx\nDefault region name [None]:\nDefault output format [None]:<\/code><\/pre>\n<p>\n\u0421\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f \u043a API S3 AWS:<\/p>\n<pre><code class=\"bash\">ubuntu@ubuntu-basic-1-2-10gb:~$ aws configure --profile aws\nAWS Access Key ID [None]: AKIAJXXXXXXXXXXXX\nAWS Secret Access Key [None]: dfuerphOLQwu0CreP5Z8l5fuXXXXXXXXXXXXXXXX\nDefault region name [None]:\nDefault output format [None]:<\/code><\/pre>\n<p>\n\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u044b:<\/p>\n<p>\u041a AWS:<\/p>\n<pre><code class=\"bash\">ubuntu@ubuntu-basic-1-2-10gb:~$ aws s3 ls --profile aws\n2020-07-06 08:44:11 myfiles-backup<\/code><\/pre>\n<p>\n\u0414\u043b\u044f MCS, \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u043d\u0430\u0434\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c &#8212;endpoint-url:<\/p>\n<pre><code class=\"bash\">ubuntu@ubuntu-basic-1-2-10gb:~$ aws s3 ls --profile mcs --endpoint-url \nhttps:\/\/hb.bizmrg.com\n2020-02-04 06:38:05 databasebackups-0cdaaa6402d4424e9676c75a720afa85\n2020-05-27 10:08:33 myfiles-ash<\/code><\/pre>\n<p>\n\u0414\u043e\u0441\u0442\u0443\u043f \u043f\u043e\u043b\u0443\u0447\u0435\u043d.<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e \u0445\u0443\u043a\u0430, \u043d\u0430\u0437\u043e\u0432\u0435\u043c \u0435\u0433\u043e s3_backup_mcs_aws.sh<\/p>\n<pre><code class=\"bash\">#!\/bin\/bash\n# Require aws cli\n# if file added \u2014 copy it to backup bucket\n# if file removed \u2014 remove it from backup bucket\n# Variables\nENDPOINT_MCS=&quot;https:\/\/hb.bizmrg.com&quot;\nAWSCLI_MCS=`which aws`&quot; --endpoint-url ${ENDPOINT_MCS} --profile mcs s3&quot;\nAWSCLI_AWS=`which aws`&quot; --profile aws s3&quot;\nBACKUP_BUCKET=&quot;myfiles-backup&quot;\n\nSOURCE_BUCKET=&quot;${1}&quot;\nSOURCE_FILE=&quot;${2}&quot;\nACTION=&quot;${3}&quot;\n\nSOURCE=&quot;s3:\/\/${SOURCE_BUCKET}\/${SOURCE_FILE}&quot;\nTARGET=&quot;s3:\/\/${BACKUP_BUCKET}\/${SOURCE_FILE}&quot;\nTEMP=&quot;\/tmp\/${SOURCE_BUCKET}\/${SOURCE_FILE}&quot;\n\ncase ${ACTION} in\n    &quot;copy&quot;)\n    ${AWSCLI_MCS} cp &quot;${SOURCE}&quot; &quot;${TEMP}&quot;\n    ${AWSCLI_AWS} cp &quot;${TEMP}&quot; &quot;${TARGET}&quot;\n    rm ${TEMP}\n    ;;\n\n    &quot;delete&quot;)\n    ${AWSCLI_AWS} rm ${TARGET}\n    ;;\n\n    *)\n    echo &quot;Usage: ${0} sourcebucket sourcefile copy\/delete&quot;\n    exit 1\n    ;;\nesac<\/code><\/pre>\n<p>\n\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<pre><code class=\"bash\">ubuntu@ubuntu-basic-1-2-10gb:~\/s3-webhook$ sudo .\/s3-webhook -port 80 -\nscript scripts\/s3_backup_mcs_aws.sh<\/code><\/pre>\n<p>\n\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043a\u0430\u043a \u044d\u0442\u043e \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442. \u0427\u0435\u0440\u0435\u0437 <noindex><a rel=\"nofollow\" href=\"https:\/\/mcs.mail.ru\/app\/services\/storage\/buckets\/\">\u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 MCS<\/a><\/noindex> \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0444\u0430\u0439\u043b test.txt \u0432 \u0431\u0430\u043a\u0435\u0442 myfiles-ash. \u0412 \u043b\u043e\u0433\u0430\u0445 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0431\u044b\u043b \u0441\u0434\u0435\u043b\u0430\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432:<\/p>\n<pre><code class=\"bash\">2020\/07\/06 09:43:08 [POST] incoming HTTP request from \n95.163.216.92:56612\ndownload: s3:\/\/myfiles-ash\/test.txt to ..\/..\/..\/tmp\/myfiles-ash\/test.txt\nupload: ..\/..\/..\/tmp\/myfiles-ash\/test.txt to \ns3:\/\/myfiles-backup\/test.txt<\/code><\/pre>\n<p>\n\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0431\u0430\u043a\u0435\u0442\u0430 myfiles-backup \u0432 AWS:<\/p>\n<pre><code class=\"bash\">ubuntu@ubuntu-basic-1-2-10gb:~\/s3-webhook$ aws s3 --profile aws ls \nmyfiles-backup\n2020-07-06 09:43:10       1104 test.txt<\/code><\/pre>\n<p>\n\u0422\u0435\u043f\u0435\u0440\u044c \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0443\u0434\u0430\u043b\u0438\u043c \u0444\u0430\u0439\u043b \u0438\u0437 \u0431\u0430\u043a\u0435\u0442\u0430 myfiles-ash.<\/p>\n<p>\u041b\u043e\u0433\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u0430:<\/p>\n<pre><code class=\"bash\">2020\/07\/06 09:44:46 [POST] incoming HTTP request from \n95.163.216.92:58224\ndelete: s3:\/\/myfiles-backup\/test.txt<\/code><\/pre>\n<p>\n\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0431\u0430\u043a\u0435\u0442\u0430:<\/p>\n<pre><code class=\"bash\">ubuntu@ubuntu-basic-1-2-10gb:~\/s3-webhook$ aws s3 --profile aws ls \nmyfiles-backup\nubuntu@ubuntu-basic-1-2-10gb:~$<\/code><\/pre>\n<p>\n\u0424\u0430\u0439\u043b \u0443\u0434\u0430\u043b\u0435\u043d, \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0448\u0435\u043d\u0430.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438 ToDo<\/h3>\n<p>\n\u0412\u0435\u0441\u044c \u043a\u043e\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043b\u0435\u0436\u0438\u0442 <noindex><a rel=\"nofollow\" href=\"https:\/\/github.com\/RomanenkoDenys\/s3-webhook\">\u0432 \u043c\u043e\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a><\/noindex>. \u0422\u0430\u043c \u0436\u0435 \u043b\u0435\u0436\u0430\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0441\u0438\u0433\u043d\u0430\u0442\u0443\u0440 \u0434\u043b\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432. <\/p>\n<p>\u0414\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u2014 \u043d\u0435 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c S3-\u0432\u0435\u0431\u0445\u0443\u043a\u0438 \u0432 \u0441\u0432\u043e\u0435\u0439 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041a\u0430\u043a \u044f \u0441\u043a\u0430\u0437\u0430\u043b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435, \u0435\u0441\u043b\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u0435, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043a\u0430\u043a \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u043f\u0435\u0440\u0435\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u043f\u043e\u0434 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u0443\u044e \u0440\u0430\u0431\u043e\u0442\u0443: \u043f\u0440\u0438\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u0438 (RabbitMQ \u0438\u043b\u0438 NATS), \u0430 \u043e\u0442\u0442\u0443\u0434\u0430 \u0438\u0445 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u0442\u044c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c worker-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u043c\u0438. \u0418\u043d\u0430\u0447\u0435 \u043f\u0440\u0438 \u043c\u0430\u0441\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u0442\u044c\u0441\u044f \u0441 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u043e\u0439 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447. \u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u0436\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u0435\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043d\u043e\u0441\u0438\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 workers, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0448\u0430\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0441 \u043f\u043e\u0432\u0442\u043e\u0440\u043e\u043c \u0437\u0430\u0434\u0430\u0447 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0431\u043e\u0435\u0432. \u0422\u0430\u043a \u0436\u0435 \u0436\u0435\u043b\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043c\u0435\u043d\u044f\u0442\u044c \u043b\u043e\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0430 \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0435 \u0438 \u0431\u043e\u043b\u0435\u0435 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435.<\/p>\n<p>\u0423\u0441\u043f\u0435\u0445\u043e\u0432!<\/p>\n<p>\u0415\u0449\u0435 \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e \u0442\u0435\u043c\u0435:<\/p>\n<ul>\n<li><noindex><a rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/mailru\/blog\/507470\/\">\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u044b\u043c S3-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435\u043c Mail.ru Cloud Solutions \u043a\u0430\u043a \u0441 \u0444\u0430\u0439\u043b\u043e\u0432\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439.<\/a><\/noindex><\/li>\n<li><noindex><a rel=\"nofollow\" href=\"https:\/\/vc.ru\/services\/134157-kak-ispolzuyut-obektnoe-hranilishche-chtoby-obygrat-konkurentov\">\u041a\u0430\u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u044b\u0433\u0440\u0430\u0442\u044c \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442\u043e\u0432.<\/a><\/noindex><\/li>\n<\/ul>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/company\/mailru\/blog\/510110\/\">habr.com<\/a> <\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>Rube Goldberg coffee machine Event-driven architecture \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0446\u0435\u043d\u043e\u0432\u0443\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0430\u0441\u0441\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 worker-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0418 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043d\u0435 \u043f\u0440\u043e FaaS, \u0430 \u043f\u0440\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0438. \u042f \u043f\u043e\u043a\u0430\u0436\u0443 \u0443\u0447\u0435\u0431\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":88464,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-88463","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Rube Goldberg coffee machine Event-driven architecture \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0446\u0435\u043d\u043e\u0432\u0443\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0430\u0441\u0441\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 worker-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0418 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043d\u0435 \u043f\u0440\u043e FaaS, \u0430 \u043f\u0440\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0438. \u042f \u043f\u043e\u043a\u0430\u0436\u0443 \u0443\u0447\u0435\u0431\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/primer-event-driven-prilozheniya-na-osnove-vebhukov-v-obektnom-s3-hranilishhe-mail-ru-cloud-solutions\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"de_DE\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041f\u0440\u0438\u043c\u0435\u0440 event-driven \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c S3-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 Mail.ru Cloud Solutions | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"Rube Goldberg coffee machine Event-driven architecture \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0446\u0435\u043d\u043e\u0432\u0443\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0430\u0441\u0441\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 worker-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0418 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043d\u0435 \u043f\u0440\u043e FaaS, \u0430 \u043f\u0440\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0438. \u042f \u043f\u043e\u043a\u0430\u0436\u0443 \u0443\u0447\u0435\u0431\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/primer-event-driven-prilozheniya-na-osnove-vebhukov-v-obektnom-s3-hranilishhe-mail-ru-cloud-solutions\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2020-07-14T11:42:05+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2020-07-14T11:42:05+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47 Beispiel einer ereignisgesteuerten Anwendung basierend auf Webhooks im objektbasierten S3-Speicher von Mail.ru Cloud Solutions | ProHoster","description":"Die Rube Goldberg Kaffeemaschine: Ereignisgesteuerte Architektur erh\u00f6ht die Kosteneffizienz der eingesetzten Ressourcen, da diese nur dann aktiviert werden, wenn sie ben\u00f6tigt werden. Es gibt zahlreiche M\u00f6glichkeiten, dies umzusetzen, ohne zus\u00e4tzliche Cloud-Entit\u00e4ten als Worker-Anwendungen zu schaffen. Heute werde ich jedoch nicht \u00fcber FaaS sprechen, sondern \u00fcber Webhooks. Ich werde ein Beispiel zur Verarbeitung von Ereignissen mit Hilfe von zeigen.","canonical_url":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/primer-event-driven-prilozheniya-na-osnove-vebhukov-v-obektnom-s3-hranilishhe-mail-ru-cloud-solutions","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"de_DE","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041f\u0440\u0438\u043c\u0435\u0440 event-driven \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0432\u0435\u0431\u0445\u0443\u043a\u043e\u0432 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u043d\u043e\u043c S3-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 Mail.ru Cloud Solutions | ProHoster","og:description":"Rube Goldberg coffee machine Event-driven architecture \u043f\u043e\u0432\u044b\u0448\u0430\u0435\u0442 \u0446\u0435\u043d\u043e\u0432\u0443\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d\u0438 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0442\u043e\u0442 \u043c\u043e\u043c\u0435\u043d\u0442, \u043a\u043e\u0433\u0434\u0430 \u043e\u043d\u0438 \u043d\u0443\u0436\u043d\u044b. \u0421\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0430\u0441\u0441\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432, \u043a\u0430\u043a \u044d\u0442\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 worker-\u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439. \u0418 \u0441\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u043d\u0435 \u043f\u0440\u043e FaaS, \u0430 \u043f\u0440\u043e \u0432\u0435\u0431\u0445\u0443\u043a\u0438. \u042f \u043f\u043e\u043a\u0430\u0436\u0443 \u0443\u0447\u0435\u0431\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e","og:url":"https:\/\/prohoster.info\/de\/blog\/administrirovanie\/primer-event-driven-prilozheniya-na-osnove-vebhukov-v-obektnom-s3-hranilishhe-mail-ru-cloud-solutions","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2020-07-14T11:42:05+00:00","article:modified_time":"2020-07-14T11:42:05+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"88463","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-02-28 13:29:47","updated":"2022-09-28 07:55:39"},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/88463","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/comments?post=88463"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/posts\/88463\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media\/88464"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/media?parent=88463"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/categories?post=88463"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/de\/wp-json\/wp\/v2\/tags?post=88463"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}