Topic

AWS

A collection of 14 issues

[AWS]Fargate网络

Task Networking in AWS Fargate 本章节内容编译自这篇官方博客 [https://aws.amazon.com/blogs/compute/task-networking-in-aws-fargate/]。 跑Fargate的第一步是定义ECS Task. Task是一个Logical Group,由一或多个Docker container组成,根据特定配置进行部署。当跑Fargate Task时,需要考虑两种类型的网络: * Container (local) networking * External networking Container Networking 通常用于tightly coupled application components.比方服务静态内容同时需要生成动态页面的应用,把web tier和 api tier放一起,用local networking,这样web tier可以从api tier拿信息。单机下,web tier application process可以和API process在同一机器内通过local
7 min read

[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