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
Perl meets AWS Lambda
Search
moznion
January 26, 2019
Technology
0
4.7k
Perl meets AWS Lambda
This slide is for YAPC::Tokyo 2019 LT
moznion
January 26, 2019
Tweet
Share
More Decks by moznion
See All by moznion
Develop to Survive - YAPC::Hakodate 2024 Keynote
moznion
9
14k
これはPerl? それともRuby? クイズ〜〜〜〜〜!!!- Perl or Ruby Quiz
moznion
3
2.4k
Perl 5 OOP機構30年史 - Perl 5's OOP Mechanism over the past 30 years
moznion
1
930
RuboCopのカスタムCopを書いてContributionしてみる - Contributing a Custom Cop to RuboCop: A Hands-on Experience
moznion
0
65
AWS上に構築する メンテ容易なElasticsearch System / Maintainable Elasticsearch system on AWS
moznion
2
3.9k
PROXY Protocol aware Proxy Server on Node.js
moznion
2
2.5k
ソフトウェア開発における 「設計」と「パフォーマンス」の相互作用 / Interaction Between Design and Performance on Software Development
moznion
12
6.9k
Javaカードの世界 / The world of Java Card
moznion
9
13k
無限にスケールする上に自律的なJenkinsに見る夢~AWS篇~ / Dream of autonomous and infinite scalable Jenkins with AWS
moznion
21
7k
Other Decks in Technology
See All in Technology
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
110
社外コミュニティで学び社内に活かす共に学ぶプロジェクトの実践/backlogworld2024
nishiuma
0
240
イノベーショントークから見るクラウド運用の未来を振り返ってみた
nyankotaro
0
480
Wantedly での Datadog 活用事例
bgpat
1
120
MLOps の現場から
asei
5
600
AI時代のデータセンターネットワーク
lycorptech_jp
PRO
1
250
新機能Amazon GuardDuty Extended Threat Detectionはネ申って話
cmusudakeisuke
0
470
alecthomas/kong はいいぞ / kamakura.go#7
fujiwara3
1
280
同一クラスタ上でのFluxCDとArgoCDのリソース最適化の話
kumorn5s
0
210
Kubernetes環境のオブザーバビリティの次の一歩をOpenTelemetryで実現すると何がどうなるの? - CloudNative Days Winter 2024
katzchang
0
130
『GRANBLUE FANTASY: Relink』続・最高の「没入感」を実現するカットシーン制作手法とそれを支える技術
cygames
0
130
podman_update_2024-12
orimanabu
1
230
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Designing for humans not robots
tammielis
250
25k
How GitHub (no longer) Works
holman
311
140k
What's in a price? How to price your products and services
michaelherold
243
12k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
2
270
Testing 201, or: Great Expectations
jmmastey
40
7.1k
Making the Leap to Tech Lead
cromwellryan
133
9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
BBQ
matthewcrist
85
9.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Transcript
Perl meets AWS Lambda YAPC::Tokyo 2019 @moznion
None
͜Εӕʂʂʂʂ
AWS Lambdaͷ͓
AWS Lambda - ͍ϫϯγϣοτͷίϯϐϡʔςΟϯά ϦιʔεΛఏڙ (࠷ۙ5͔Β15ʹ) - αʔόϨεͱ͔ݺΕͯΔͭͰ͢ʢࡶʣ
͍ͭʹAWS LambdaʹΞϨ͕དྷ·ͨ͠Ͷ
͍ͭʹAWS LambdaʹΞϨ͕དྷ·ͨ͠Ͷ Ruby
YAPCͩͧʂʂʂ
AWS Lambda Layers
AWS Lambda Layers - ҙͷϥϯλΠϜΛLambda্Ͱಈ͔ͤΔΈ - ϥϯλΠϜͱbootstrapΛzipʹΞʔΧΠϒͯ͠ Ξοϓϩʔυ - See
Also https://docs.aws.amazon.com/lambda/latest/ dg/configuration-layers.html
bootstrap - LayerͷίΞίϯϙʔωϯτ - Lambda FunctionͰLayerΛ༗ޮʹ͢Δͱ ͜ͷbootstrap͕ୟ͔ΕΔ
3. Do function bootstrap bootstrap AWS platform 1. Next Invocation
API 2. Event 4. Invocation Response/Error
γϯϓϧͰ͢Ͷ
AWS Lambda Layers - ҙͷϥϯλΠϜΛLambda্Ͱಈ͔ͤΔΈ - ϥϯλΠϜͱbootstrapΛzipʹΞʔΧΠϒͯ͠ Ξοϓϩʔυ - See
Also https://docs.aws.amazon.com/lambda/latest/ dg/configuration-layers.html
AWS Lambda Layers - ҙͷϥϯλΠϜΛLambda্Ͱಈ͔ͤΔΈ - ϥϯλΠϜͱbootstrapΛzipʹΞʔΧΠϒͯ͠ Ξοϓϩʔυ - See
Also https://docs.aws.amazon.com/lambda/latest/ dg/configuration-layers.html
AWS Lambda Layers - ҙͷϥϯλΠϜΛLambda্Ͱಈ͔ͤΔΈ - ϥϯλΠϜͱbootstrapΛzipʹΞʔΧΠϒͯ͠ Ξοϓϩʔυ - See
Also https://docs.aws.amazon.com/lambda/latest/ dg/configuration-layers.html Perl
aws-lambda-perl5-layer
Perl Lambda Layer - Repository: https://github.com/moznion/aws- lambda-perl5-layer - Blog: aws-lambda-perl5-layer
ॻ͍ͨ -
Perl Lambda Layer - Ϟνϕʔγϣϯ - ੜ͖͍ͯΔͱ͍Ζ͍Ζ͋Δ - తح৺ -
ੜ͖͍ͯΔͱ͍Ζ͍Ζ͋Δ
Perl Lambda Layer - Layerͷ࡞Γํ - bootstrapΛॻ͘ - LambdaͷϕʔεDockerίϯςφʹperlΛΠϯετʔϧ -
Πϯετʔϧͨ͠PerlϥϯλΠϜͱbootstrapΛzipʹݻΊΔ - Ξοϓϩʔυʂʂ
؆୯Ͱ͢Ͷ
Perl Lambda Layer - ಛ - carton friendly - ϏϧυࡁΈLayerఏڙ͋Γ
- arn:aws:lambda:${REGION}:652718333417:layer:perl-5_26-layer:1 - arn:aws:lambda:${REGION}:652718333417:layer:perl-5_28-layer:1 - શAWSϦʔδϣϯαϙʔτ
Perl Lambda Layer - ap-northeast-1 - ap-northeast-2 - ap-south-1 -
ap-southeast-1 - ap-southeast-2 - ca-central-1 - eu-central-1 - eu-west-1 - eu-west-2 - eu-west-3 - sa-east-1 - us-east-1 - us-east-2 - us-west-1 - us-west-2
Perl Lambda Layer - FunctionͷσϓϩΠํ๏ - (dependencyΛlocalҎԼʹvendoring͢Δ) - σΟϨΫτϦશମΛzipʹ·ͱΊΔ
؆୯Ͱ͢Ͷʁ
͍ʔΊΜͲ͘Ͷʁ
͍……
……
App::Perlambda
App::Perlambda - aws-lambda-perl5-layer͚ͷϚωδϝϯτ CLIπʔϧ - dist, create, updateʹରԠ - https://github.com/moznion/p5-App-Perlambda
DEMO
·ͱΊ - Ruby͕AWS LambdaʹରԠ͠·ͨ͠ - AWS LambdaʹLayers͕͖ͬͯ·ͨ͠ - Perl͕LayerͷྗͰAWS LambdaʹରԠ͠·ͨ͠
- App::Perlambdaͱ͍͏ˢͷϚωδϝϯτπʔϧ Λॻ͖·ͨ͠
ॴײ - ࣮ࡍLambdaॻ͘ͳΒඇಉظॲཧ͍͢͠ݴޠΛ બΜͩ΄͏͕͍͍ͱࢥ͏…… - go - node - ͳͲ
- ͳ͓ fork(2) Ͳ͏Βಈ͘……
ͦͷଞ - ศརͦ͏ͳͷ͕ग़ͨ - https://github.com/awslabs/aws-lambda- container-image-converter
͓ΘΓ