Topic

Lambda

A collection of 3 issues

[AWS]使用lambda向Slack和Google Chat推送pipeline状态

动机:在Slack Channel中显示Codepipeline的运行消息。 Feature包括: * 自动判断Account(Dev or Prod) * 用对应颜色展示管线运行成功与否 * 管线URL link * 自动提取GitHub Hash 具体实现组成部分如下: * Slack Webhook * Cloudwatch Event * Lambda (Python) Slack 准备Slack Webhook:Sending messages using Incoming Webhooks [https://api.slack.com/messaging/webhooks]。 legacy的互动方法用的是通过attachments,官方推荐的新方法是block:Creating rich message layouts [https://api.slack.com/messaging/composing/layouts]。 Cloudwatch Cloudwatch Event可以选择codepipeline作为源头,
5 min read

[AWS][Elasticsearch]记一次Elasticsearch无法捕捉到fargate log的解决

说问题前,首先说一下这个做法的思路和实现步骤: * Cloudformation定义Resource时需要AWS::Logs::LogGroup * 在Cloudwatch Log group里找到对应ECS fargate产生的Log, 选中后Actions-->Stream to Amazon Elasticsearch Service,选中已创建的ES Cluster, 选择Log Format,后续会自动生成对应的Lambda和Role * 修改Lambda, 将indexName由原先的 payload.logEvents.forEach(function(logEvent) { var timestamp = new Date(1 * logEvent.timestamp); var indexName = [ 'cw-' + timestamp.getUTCFullYear(), // year ('0' + (timestamp.getUTC
2 min read

Subscribe to 隅

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe