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
13k
これはPerl? それともRuby? クイズ〜〜〜〜〜!!!- Perl or Ruby Quiz
moznion
3
2.3k
Perl 5 OOP機構30年史 - Perl 5's OOP Mechanism over the past 30 years
moznion
1
890
RuboCopのカスタムCopを書いてContributionしてみる - Contributing a Custom Cop to RuboCop: A Hands-on Experience
moznion
0
60
AWS上に構築する メンテ容易なElasticsearch System / Maintainable Elasticsearch system on AWS
moznion
2
3.9k
PROXY Protocol aware Proxy Server on Node.js
moznion
2
2.4k
ソフトウェア開発における 「設計」と「パフォーマンス」の相互作用 / 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
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.8k
データの信頼性を支える仕組みと技術
chanyou0311
6
1.7k
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
6
1.9k
Platform Engineering for Software Developers and Architects
syntasso
1
450
mikroBus HAT を用いた簡易ベアメタル開発
tarotene
0
330
SREの組織類型に応じた リーダシップの考察
kenta_hi
PRO
1
640
第23回Ques_タイミーにおけるQAチームの在り方 / QA Team in Timee
takeyaqa
0
270
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
310
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
350
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
1
180
いろんなものと両立する Kaggleの向き合い方
go5paopao
2
1.1k
強いチームと開発生産性
onk
PRO
29
9k
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.1k
How to Ace a Technical Interview
jacobian
276
23k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Building an army of robots
kneath
302
42k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
506
140k
The World Runs on Bad Software
bkeepers
PRO
65
11k
How STYLIGHT went responsive
nonsquared
95
5.2k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Adopting Sorbet at Scale
ufuk
73
9.1k
A designer walks into a library…
pauljervisheath
202
24k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
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
͓ΘΓ