Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
20221112_四国クラウドお遍路.pdf
Search
koara
November 14, 2022
Technology
0
330
20221112_四国クラウドお遍路.pdf
koara
November 14, 2022
Tweet
Share
More Decks by koara
See All by koara
SST ( Serverless Stack Toolkit ) 使ってみた
ra1211
0
230
AWSでデータ解析を始めたーい
ra1211
0
310
もめんと会 Momento Cache
ra1211
0
70
JAWS-UG 名古屋 AVAハンズオン+re:Inforceの復習
ra1211
0
120
JAWS ミート 2023
ra1211
0
65
JAWS-UG大阪 AWS re:Invent 2022 re:Cap
ra1211
0
120
Other Decks in Technology
See All in Technology
『君の名は』と聞く君の名は。 / Your name, you who asks for mine.
nttcom
1
140
SES向け、生成AI時代におけるエンジニアリングとセキュリティ
longbowxxx
0
290
小さく、早く、可能性を多産する。生成AIプロジェクト / prAIrie-dog
visional_engineering_and_design
0
310
AI with TiDD
shiraji
1
330
ハッカソンから社内プロダクトへ AIエージェント ko☆shi 開発で学んだ4つの重要要素
leveragestech
0
540
I tried making a solo advent calendar!
zzzzico
0
120
テストセンター受験、オンライン受験、どっちなんだい?
yama3133
0
200
なぜ あなたはそんなに re:Invent に行くのか?
miu_crescent
PRO
0
250
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
善意の活動は、なぜ続かなくなるのか ーふりかえりが"構造を変える判断"になった半年間ー
matsukurou
0
180
[PR] はじめてのデジタルアイデンティティという本を書きました
ritou
0
740
RALGO : AIを組織に組み込む方法 -アルゴリズム中心組織設計- #RSGT2026 / RALGO: How to Integrate AI into an Organization – Algorithm-Centric Organizational Design
kyonmm
PRO
3
480
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
77
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
Building AI with AI
inesmontani
PRO
1
610
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.5k
Ethics towards AI in product and experience design
skipperchong
1
150
Designing for Performance
lara
610
70k
Discover your Explorer Soul
emna__ayadi
2
1k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
270
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
38
Transcript
四国クラウドお遍路 • 2022/11/12 • 古賀 巧
アジェンダ 自己紹介 JAWS-UGに初めて参加してみた話 Lambda Powertoolsを使ってみた話
3 自己紹介 ▪氏名・年齢 古賀 巧(@koara__fftr) 26→27歳 ▪経歴 SESでプリンタードライバーの開発・保守 ▪資格 ▪趣味
音楽
4 AWSとの出会い 去年夏 社内スピーチ AWS!! AWS!! AWS!!
5 AWS以前 AWSに出会ってから • 自分だけのネットワークを作成・管理 • アプリ全体を作成 • C/C++/C# •
Pythonすこし • 各種ログ(トレースログ,パケログ) • ダンプ解析etc.. 楽 し い 楽しい 楽しい 楽しい 楽しい
6 社内は難しそうなので社外へ...
7 JAWSに参加して良かったこと • 視野が広がる • やってみたいことが見つけられる • インプットの量が爆増 • 何とかなる☆(ゝω・)v
AWS Lambda Powertools for Python 使ってみた
9 サーバーレスは分散アーキテクチャー
10 分散アーキテクチャーを上手く運用するには →Serverless Applications Lens
11 Serverless Applications Lens Design Principles 1. Speedy, simple, singular
2. Think concurrent requests, not total requests 3. Share nothing 4. Assume no hardware affinity 5. Orchestrate your application with state machines, not functions 6. Use events to trigger transactions 7. Design for failures and duplicates
12 Serverless Applications Lens Operate section Metrics and alerts Centralized
and structured logging Distributed tracing Prototyping Configuration Testing Deploying
13 AWS Lambda Powertoolsとは AWSが開発するのオープンソースユーティリティー ▪できること Metrics Logger Tracer Event
Handler etc.. ▪使用できる言語 Java, Typescript, Python, .NET
14 AWS Lambda Powertoolsとは
15 AWS Lambda Powertools for Python ▪使い方 Lambda Layerとして利用 Lambda
Layer (x86_64):arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2:13 Lambda Layer (arm64): arn:aws:lambda:{region}:017000801446:layer:AWSLambdaPowertoolsPythonV2-Arm64:13 PyPiからインストール PyPi: pip install "aws-lambda-powertools“ SAM: requirements.txt に aws-lambda-powertools を追加
16 Tracer X-Ray SDKのラッパー 通ったルートの可視化、例外情報もキャプチャ
17 Tracer 使い方
18 Metrics ※Lambda Powertools が使用できない言語を使用している 場合は Amazon CloudWatch Embedded Metric
Format ライブラリーを使用する 1. Lambda実行時にCloudWatch Logs へEMF形式でログ出力 2. CloudWatch Logs→非同期にCloudWatch Metrics
19 Metrics ※Lambda Powertools が使用できない言語を使用してい る場合は Amazon CloudWatch Embedded Metric
Formatライブラリーを使用する 様々な目的 • 運用のためのメトリクス • ビジネスKPIのためのメトリクス • ユーザーエクスペリエンスのメトリクス • システムのメトリクス
20 Metrics ※Lambda Powertools が使用できない言語を使用してい る場合は Amazon CloudWatch Embedded Metric
Formatライブラリーを使用する 使い方
2022/11/14 プレゼンテーションのタイトル 21 Logger よしなにJSON形式のログ出力 Handler以外でのログ出力も可能
22 AWS Lambda Powertools まとめ 障害を防ぐための運用をサポート 障害発生後の解析もサポート
参考サイト https://aws.amazon.com/jp/builders-flash/202203/lambda-powertools-python-1/?awsf.filter-name=*all https://awslabs.github.io/aws-lambda-powertools-python/2.2.0/ https://awstip.com/monitoring-lambdas-using-aws-powertools-1d11c0157c8e
ご清聴ありがとうございました