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
Lambda + S3 썸네일 생성 및 운영 - AWSKRUG 정기 세미나 (2016년...
Search
seapy
September 21, 2016
Programming
1
550
Lambda + S3 썸네일 생성 및 운영 - AWSKRUG 정기 세미나 (2016년 9월)
"AWSKRUG 정기 세미나 (2016년 9월) - 서버리스(Serverless) 아키텍처"에서 발표한 내용.
당근마켓의 썸네일 서비스 방식을 변경한 이야기
seapy
September 21, 2016
Tweet
Share
More Decks by seapy
See All by seapy
형태소 분석기를 적용한 elasticsearch 운영
seapy
0
450
Amazon ec2 container service 소개
seapy
0
82
boot2docker 사용시 컨테이너에서 생성한 데이터를 유지하기
seapy
0
79
Elasticsearch + fluentd for Log analysis
seapy
3
9.9k
ActiveRecord Associations(2) - RORLab Season 3-8
seapy
0
45
ActiveRecord Associations(1) - RORLab Season 3-7
seapy
0
64
ActiveRecord Observers - RORLab Season 3-6
seapy
0
45
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
41
Rails Database Migrations - RORLab Season 3-3
seapy
2
97
Other Decks in Programming
See All in Programming
タクシーアプリ『GO』のリアルタイムデータ分析基盤における機械学習サービスの活用
mot_techtalk
4
1.4k
リアーキテクチャxDDD 1年間の取り組みと進化
hsawaji
1
220
AWS Lambdaから始まった Serverlessの「熱」とキャリアパス / It started with AWS Lambda Serverless “fever” and career path
seike460
PRO
1
250
Jakarta EE meets AI
ivargrimstad
0
130
最新TCAキャッチアップ
0si43
0
140
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
Realtime API 入門
riofujimon
0
150
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
890
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
Arm移行タイムアタック
qnighy
0
310
初めてDefinitelyTypedにPRを出した話
syumai
0
400
Click-free releases & the making of a CLI app
oheyadam
2
110
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
Git: the NoSQL Database
bkeepers
PRO
427
64k
The Invisible Side of Design
smashingmag
298
50k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
Writing Fast Ruby
sferik
627
61k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
How GitHub (no longer) Works
holman
310
140k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
BBQ
matthewcrist
85
9.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Transcript
Lambda + S3 ॉ֎ੌ ࢤࢿ ߂ AWSKRUG ӝ ࣁա
(2016֙ 9ਘ) - ࢲߡܻझ(Serverless) ইఃఫ
ହള(@seapy) Ӕ݃ iOS ѐߊ, ࢲߡח оՔ...
ঌ۰ ॉ֎ੌ ࢤࢿ ߑߨ · ਗࠄ о ࢤࢿغݶ ॉ֎ੌ ࢤࢿ
റ ੌ۽ · ॉ֎ੌ ܳ ਃೞח दী पदрਵ۽ ࢤࢿ
ॉ֎ੌ ܻ ࢤࢿ · ॉ֎ੌ ӝо ߸҃غݶ ݽٚ ॉ֎ੌਸ द
ࢤࢿ · , ॉ֎ੌ ӝо নೡࣻ۾ ݆ ҕр ࢎਊ
ৡ٣ݔ٘ ॉ֎ੌ ࢤࢿ ॉ֎ੌਸ ܻ ࢤࢿೞח ߑߨীࢲ ػ ױਸ ೧Ѿ
· ॉ֎ੌ ӝ ߸҃ী ٮܲ ѐߊ ߂ ୭ࣗ · ҕр ѐࣻ ݅ఀ݅ ࢎਊ (ଵҊ : ࢲߡ ࠺ਊਸ 70%ա ੋ ৡ٣ݔ٘ ܻࢎ ঠӝ — VCNC ূפয݂ ࠶۽Ӓ)
ৡ٣ݔ٘ ॉ֎ੌ ࢤࢿ ױ · ೠ ߣী ցޖ ਃ ށܻݶ
߸ജ पಁ оמ (ॉ֎ੌ ӝ ߸ജ э ҃ա CDN ޙઁ) · CDN நद өח э ਃਸ ߈ࠂ೧ࢲ ܻ
Ӕ݃ ࢎ۹ 1 refile અਸ ਊ೧ ৡ٣ݔ٘ ॉ֎ੌ ߑध 1֙
· Ҋ ౠࢿ࢚ CDN நएী زद ࣘ · reflie અ ౠࢿਵ۽ ۨੌझ৬ э ࢲߡ ࢎਊ · ܻࢎҗ ਢࢲߡ ਃਗ ܴ
ৡ٣ݔ٘ח ನӝ · ࣗӏݽۄ ৡ٣ݔ٘۽ ੋೠ ҕр ബਯ ѐࢶ ծ
· reflie ࢎਊೞݶࢲ ѻ؍ ۄ݃ ੋ ৡ٣ݔ٘ী ೠ ੋध ѐࢶ উؽ ƑƑ · ࢲߡ ী ೠ ӈଳ
Lambda + S3
S3 · ݽ߄ੌ ۄীࢲ S3۽ ߄۽ স۽٘ · ੌ
୶о ߮۽ Lambda प೯
Lambda · ࢲߡ ਃ হ · प೯दр ӝળਵ۽
җӘ · ې ށ۰ب ঌইࢲ झாੌ݂
֎߁ ӏ ী ӏਸ ੜ ೧ঠ աী ഛоמ ҃۽ ӝ߈ਵ۽
ߣ૩ ಫ؊ী ٮۄ ࢲ۽ ܲ ࢎૉ ॉ֎ੌਸ ࢤࢿ
None
Lambda
ߓನ ୷ੌ ࢤࢿ झ݀۽ zip ࢤࢿറ ࣻز স۽٘ #!/bin/sh zip
-r lambda index.js node_modules
۽Ӓ ഛੋೞӝ ୭Ӕ 2दр ղ Error ۽Ӓ ۱ $ aws
logs filter-log-events \ --start-time `date -v-2H "+%s"`000 \ --log-group-name "/aws/lambda/MakeImageResize" \ --filter-pattern "Error" \ --interleaved \ --output json'
ఋইਓ ী۞ী ೠ ఋইਓ ۽Ӓী ࣁೠ ղਊਸ ۱ೞ ঋ
թ दр 500ms ݶ ী۞ ߔ ഐ const timeout = setTimeout(() => { callback(new Error(`[FAIL]:${bucket}/${key}:TIMEOUT`)); }, context.getRemainingTimeInMillis() - 500); // clear ח ٘ ઙܐ दী ݺदਵ۽ ೧ঠೣ clearTimeout(timeout);
য়ܨܻ ߂ दب · ী۞о ߊࢤೞѢա पಁೞݶ दب (ݫݽܻ ࠗ,
زदप೯ ઁೠ, ఋইਓ, ӝఋ ী۞) · ߮ ఋੑҗ ܻѢೞח ࣗझী ٮۄ ܴ · S3 ё ࢤࢿ ߮ ࣗझח 3ߣ दب
زद प೯іࣻ ઁೠ · Throttles : زदী प೯غח Lambda ѐࣻ
· ઁೠী Ѧܻݶ 1 ۄҊ݅ द · ݃ա ؊ ਃೠ ݽܴ · ӝࠄчਵ۽ ҅ & 100ѐ · ࢎী ۚ ஏ೧ࢲ ܻ Supportী न (ب ӝળ 3)
Apex эѦ ࢎਊೞ ঋ ਬ? · ࣗझ٘ ࢿೞҊ դറী
ઓܳ ঌѱؽ · ೧ ో ӝמਸ ҕࠗೞחѪী ೠ दр ࠗ
খਵ۽ ೞҊ रѢ · Lambda + API GWܳ ਊೠ ৡ٣ݔ٘
ܻࢎ · ࢲ ܻਵ۽ (ب S3ী ё ୶оೞݶ ࢲ S3ী ୶о ೞҊ रؘ -_-a)
ߊܐ · http://www.slideshare.net/seapy · https://speakerdeck.com/seapy · "AWS Lambdaܳ ਊೠ ॉ֎ੌ
ࢤࢿ ѐߊ റӝ" http://bit.ly/2diCYU5 · N42 ࠶۽Ӓ https://medium.com/n42-corp
.