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
Real World Serverless
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
freee
PRO
January 17, 2017
Technology
9.4k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Real World Serverless
freeeでのAWS Lambdaを利用したServerlessの活用方法
アーキテクチャの紹介やリージョンをまたいだ際の注意点など
from nasa
freee
PRO
January 17, 2017
More Decks by freee
See All by freee
AI Readyの正体はデータマネジメントだ メダリオン2.0の最前線
freee
PRO
0
570
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
610
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
700
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
170
freeeにおけるAI分析エージェントの実践
freee
PRO
0
480
クラウドネイティブ会議Day1_AI時代の開発スピードに追いつけ! Argo CD ApplicationSetと挑む、PR単位の検証環境/Cloud Native Conference Day 1: Keeping Pace with Development Speeds in the AI Era! Building a Pull Request-Level Testing Environment with Argo CD ApplicationSet
freee
PRO
0
410
激動のAI導入ミッションに、 freeeのセキュリティチームはどう向き合ったのか/How did freee's security team tackle the turbulent AI implementation mission
freee
PRO
0
2.2k
10分で分かるfreee__エンジニア向け会社説明資料/freee in 10 Minutes Company Overview for Engineers
freee
PRO
0
270
20251115_btconJP_フリー社における生成AI活用の試行錯誤とこれから
freee
PRO
1
350
Other Decks in Technology
See All in Technology
データエンジニアリングワークショップ:Auto LoaderとSparkで学ぶデータパイプライン構築
databricksjapan
PRO
0
120
Nav2、Nav3 ... はたまた自作?〜 作って理解する Nav3 の設計意図 〜 / Nav2, Nav3 ... or Build Your Own? — Understanding Nav3's design intent by building it from scratch
yanzm
0
180
PdMをやめて、 "プロダクトビルダー"という 働き方に変えました / PdM to Product Builder
shikichee
2
660
いま、生成AIにKaggleをどこまで 任せられるか — ROGIIコンペでの進め方とTips
k951286
2
1.3k
DMMブックスのNext.js化を加速させるAI活用 / Migrating DMM Books to Next.js with AI
kentarom
1
330
全社に広がるMCPサーバーを、 どう安全に管理するか MCPass開発の舞台裏
mtpooh
3
270
なぜSRE・セキュリティは評価されないのか?守りの組織を事業成長エンジンに変えた実践
cscengineer
PRO
2
2k
Genie Code ワークショップ 応用編 / Genie-Code-Workshop-advanced
databricksjapan
PRO
0
280
どんな手を使っても絶対間に合わせるスケジューラ
asari194617
0
1.5k
プロダクト思考 × 基盤思考を AIで実現する Compound Engineering
tkc66buzz
1
220
IDperturb: Enhancing Variation in Synthetic Face Generation via Angular Perturbation
sansantech
PRO
0
110
When Does a Local Qwen Start to Break
morshoto
0
150
Featured
See All Featured
GitHub's CSS Performance
jonrohan
1033
470k
Darren the Foodie - Storyboard
khoart
PRO
3
3.9k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
510
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
510
Git: the NoSQL Database
bkeepers
PRO
432
67k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
510
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
A Soul's Torment
seathinner
7
3.5k
Ruling the World: When Life Gets Gamed
codingconduct
0
320
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
330
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
260
Transcript
Real World Serverless nasa @ freee 2017.1.17 Serverless Meetup Tokyo#2
1
はじめまして • nasa (Asaoka Natsuki) • 紅茶, ガジェット, fedora 好き
• 2014 年から で engineer • その前はとある public cloud (IaaS) の開発を していました 2
3 freee にレシート・請求書のメールを転送 freee への登録部分に AWS Lambda を使用 PDF OCRにかけて
会計情報をつくるよ! 2016/11 freee Meets Serverless!!
recipe • AWS SES - メール受信 • AWS Lambda -
node.js • AWS DynamoDB • AWS S3 • apex • lambda local 4
email Amazon SES Amazon S3 Amazon S3 Amazon Lambda Amazon
Lambda Amazon DynamoD B oregon Tokyo 5 architecture
key point #1 • independent • 不正なメールが大量にきたとき、サービスへの大量アクセスを防 ぎたい • DynamoDB
で処理対象かcheck • 対象外なら exit • 障害時の復旧のしやすさ • S3 にデータがあればそれを使って再開 6 6 
key point #2 • retriable • 意図しないタイミングで retry されうる •
「実行時間 timeout」「memory 不足」etc. • retry を前提としたコード • 完了してる処理は skip • 復帰できない error は 通知して exit 7 7 
Extra • AWS の仕様を踏まえて試行錯誤 • “いつリージョンを超えるか ?” • SES は
Oregon, サービスは Tokyo • SES のイベントソースを使うと Lambda <-> S3, Lambda <-> freee 間で太平洋を越えることに…timeout の可能性Up • SES -> S3 でリージョン超え • Lambda は S3 のイベントソースを使う 8 8 
9 End We are hiring!
• apex • http://apex.run/ • lambda local • https://github.com/ashiina/lambda-local •
Understanding Container Reuse in AWS Lambda • https://aws.amazon.com/jp/blogs/compute/container-reuse-i n-lambda/ • 2016年11月度 新機能のお知らせ (※今回の機能のリリース告知) • https://www.freee.co.jp/blog/release-2016-11-30-18058.html 10 appendix