Slide 1

Slide 1 text

AWS Observability without the pain EΓ³in Shanaghy - Luciano Mammino AWS Summer School - June 24th 2021

Slide 2

Slide 2 text

Hi! I’m Eoin πŸ™‚ CTO aiasaservicebook.com @eoins eoins βœ‰ Get in touch

Slide 3

Slide 3 text

πŸ‘‹ Hello, I am Luciano Senior architect nodejsdesignpatterns.com Let’s connect: 🌎 loige.co 🐦 @loige πŸŽ₯ loige 🧳 lucianomammino

Slide 4

Slide 4 text

We are business focused technologists that deliver. Accelerated Serverless | AI as a Service | Platform Modernisation We are hiring! Let’s have a chat πŸ™‚

Slide 5

Slide 5 text

fth.link/o11y-no-pain

Slide 6

Slide 6 text

Observability in the cloud a measure of how well internal states of a system can be inferred from knowledge of its external outputs πŸͺ΅ πŸ” πŸ“ˆ 🚨 Structured Logs Tracing Metrics Alarms β€œ

Slide 7

Slide 7 text

AWS native o11y = CloudWatch Cloudwatch gives you: βž” Logs with Insights βž” Metrics βž” Dashboards βž” Alarms βž” Canaries βž” Distributed tracing (with X-Ray)

Slide 8

Slide 8 text

Outside AWS Established New entrants Roll your own (only for the brave)

Slide 9

Slide 9 text

CloudWatch out of the box 😍 A toolkit you can use to build observability 🀩 Metrics are automatically generated for all services! 😟 Lots of dashboards, but by service and not by application! 😒 Zero alarms out of the box!

Slide 10

Slide 10 text

βœ… Third-party services offer a better UX ❌ Data needs to be exported from AWS ❌ Uncertainty about future direction of new providers in this space ❌ You might be stuck in dual-mode Using third-parties

Slide 11

Slide 11 text

Getting the best out of Cloudwatch Cloudwatch can be your friend if you... πŸ“š Research and understand available metrics πŸ“ Decide thresholds πŸ“Š Write IaC for application dashboards ⏰ Write IaC for service metric alarms βͺ Update every time your application changes πŸ“‹ Copy and paste for each stack in your application (a.k.a. A LOT OF WORK!)

Slide 12

Slide 12 text

Best practices πŸ˜‡ AWS Well Architected Framework πŸ› 5 Pillars βš™ Operational excellence pillar covers observability 🧐 Serverless lens applies these pillars πŸ‘ Good guidance on metrics to observe πŸ‘Ž More reading and research + you still have to pick thresholds

Slide 13

Slide 13 text

CloudFormation for CloudWatch Alarms 😬 "Type": "AWS::CloudWatch::Alarm", "Properties": { "ActionsEnabled": true, "AlarmActions": [ "arn:aws:sns:eu-west-1:665863320777:FTSLICAlarms" ], "AlarmName": "LambdaThrottles_serverless-test-project-dev-hello", "AlarmDescription": "Throttles % for serverless-test-project-dev-hello ..", "EvaluationPeriods": 1, "ComparisonOperator": "GreaterThanThreshold", "Threshold": 0, "TreatMissingData": "notBreaching", "Metrics": [ { "Id": "throttles_pc", "Expression": "(throttles / throttles + invocations) * 100", "Label": "% Throttles", "ReturnData": true }, { "Id": "throttles", "MetricStat": { "Metric": { "Namespace": "AWS/Lambda", "MetricName": "Throttles", "Dimensions": [ { "Name": "FunctionName", "Value": "serverless-test-project-dev-hello" } ] }, "Period": 60, "Stat": "Sum" }, "ReturnData": false }, { "Id": "invocations", "MetricStat": { "Metric": { "Namespace": "AWS/Lambda", "MetricName": "Invocations",

Slide 14

Slide 14 text

Can we automate this? Magically generated alarms and dashboards for each application!

Slide 15

Slide 15 text

fth.link/slic-watch Introducing SLIC Watch

Slide 16

Slide 16 text

How SLIC Watch works πŸ›  Your app serverless.yml sls deploy CloudFormation stack very-big.json SLIC Watch πŸ‘€ πŸ›  CloudFormation stack ++ even-bigger.json Deploy ☁ πŸ“ŠπŸ“ˆ

Slide 17

Slide 17 text

Before SLIC Watch

Slide 18

Slide 18 text

After SLIC Watch

Slide 19

Slide 19 text

After SLIC Watch

Slide 20

Slide 20 text

After SLIC Watch

Slide 21

Slide 21 text

After SLIC Watch

Slide 22

Slide 22 text

After SLIC Watch Check out SLIC Slack

Slide 23

Slide 23 text

Configuration πŸŽ€ SLIC Watch comes with sane defaults πŸ“ You can configure what you don’t like πŸ”Œ Or disable specific dashboards or alarms

Slide 24

Slide 24 text

How to get started πŸ“£ Create an SNS Topic as the alarm destination πŸ“¦ ❯ npm install serverless-slic-watch-plugin --save-dev ✍ Update serverless.yml βš™ Configure (optional) 🚒 ❯ sls deploy plugins: - serverless-slic-watch-plugin πŸ’‘ Check out the complete example project in the repo!

Slide 25

Slide 25 text

Wrapping up 🎁 β˜… CloudWatch is very valuable if you configure it right! β˜… Automation takes away the pain β˜… SLIC Watch gives you this automation β˜… You still have control and flexibility πŸ”¬Try it out! πŸ—£ Give feedback! 🌈 Let’s make it better!

Slide 26

Slide 26 text

Thank you! fth.link/o11y-no-pain Cover picture by Javier Balseiro on Unsplash