{"action":"created","issue":{"url":"https://api.github.com/repos/keboola/aws-cloudtrail-slack-hook/issues/1","repository_url":"https://api.github.com/repos/keboola/aws-cloudtrail-slack-hook","labels_url":"https://api.github.com/repos/keboola/aws-cloudtrail-slack-hook/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/keboola/aws-cloudtrail-slack-hook/issues/1/comments","events_url":"https://api.github.com/repos/keboola/aws-cloudtrail-slack-hook/issues/1/events","html_url":"https://github.com/keboola/aws-cloudtrail-slack-hook/pull/1","id":373198488,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1MTg1MDU1","number":1,"title":"init","user":{"login":"JakubMatejka","id":215660,"node_id":"MDQ6VXNlcjIxNTY2MA==","avatar_url":"https://avatars2.githubusercontent.com/u/215660?v=4","gravatar_id":"","url":"https://api.github.com/users/JakubMatejka","html_url":"https://github.com/JakubMatejka","followers_url":"https://api.github.com/users/JakubMatejka/followers","following_url":"https://api.github.com/users/JakubMatejka/following{/other_user}","gists_url":"https://api.github.com/users/JakubMatejka/gists{/gist_id}","starred_url":"https://api.github.com/users/JakubMatejka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakubMatejka/subscriptions","organizations_url":"https://api.github.com/users/JakubMatejka/orgs","repos_url":"https://api.github.com/users/JakubMatejka/repos","events_url":"https://api.github.com/users/JakubMatejka/events{/privacy}","received_events_url":"https://api.github.com/users/JakubMatejka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-10-23T20:59:07Z","updated_at":"2018-10-29T10:19:00Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/keboola/aws-cloudtrail-slack-hook/pulls/1","html_url":"https://github.com/keboola/aws-cloudtrail-slack-hook/pull/1","diff_url":"https://github.com/keboola/aws-cloudtrail-slack-hook/pull/1.diff","patch_url":"https://github.com/keboola/aws-cloudtrail-slack-hook/pull/1.patch"},"body":"Většina infrastruktury (CloudTrail, S3 bucket, atd.) je v `serverless.yml`, protože jsou závislý na tý lambda funkci. \r\n\r\nVytvoří se tedy trail do S3 bucketu a na něj je natriggerovaná lambda funkce, která čte nově přidaný soubory, rozparsuje eventy CloudTrailu a vyfiltruje ty, o který máme zájem (vyjmenují se do env proměnné `WATCHED_EVENTS` - dáme tam `ConsoleLogin,SwitchRole`) a o nich pošle zprávu do Slacku. V té je název eventy, čas, user name a IP adresa."},"comment":{"url":"https://api.github.com/repos/keboola/aws-cloudtrail-slack-hook/issues/comments/433857513","html_url":"https://github.com/keboola/aws-cloudtrail-slack-hook/pull/1#issuecomment-433857513","issue_url":"https://api.github.com/repos/keboola/aws-cloudtrail-slack-hook/issues/1","id":433857513,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzg1NzUxMw==","user":{"login":"JakubMatejka","id":215660,"node_id":"MDQ6VXNlcjIxNTY2MA==","avatar_url":"https://avatars2.githubusercontent.com/u/215660?v=4","gravatar_id":"","url":"https://api.github.com/users/JakubMatejka","html_url":"https://github.com/JakubMatejka","followers_url":"https://api.github.com/users/JakubMatejka/followers","following_url":"https://api.github.com/users/JakubMatejka/following{/other_user}","gists_url":"https://api.github.com/users/JakubMatejka/gists{/gist_id}","starred_url":"https://api.github.com/users/JakubMatejka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JakubMatejka/subscriptions","organizations_url":"https://api.github.com/users/JakubMatejka/orgs","repos_url":"https://api.github.com/users/JakubMatejka/repos","events_url":"https://api.github.com/users/JakubMatejka/events{/privacy}","received_events_url":"https://api.github.com/users/JakubMatejka/received_events","type":"User","site_admin":false},"created_at":"2018-10-29T10:19:00Z","updated_at":"2018-10-29T10:19:00Z","author_association":"MEMBER","body":"Nó, lambda běží v průměru 500 ms, což je při 6M spuštěních $63 ($0,000000208 za 100 ms). Mínus teda 3,2M sekund free tier (což bych řekl, že nejspíš pořád nedáváme).\r\n\r\nOk, nachystám to pro deploy do produkce. \r\n\r\n(Jinak v tom GorillaStacku mají doporučení co logovat kvůli bezpečnosti: https://www.gorillastack.com/news/important-aws-cloudtrail-security-events-tracking/)"}}
{"actor":{"display_login":"JakubMatejka"}}