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
10
15k
これはPerl? それともRuby? クイズ〜〜〜〜〜!!!- Perl or Ruby Quiz
moznion
3
2.5k
Perl 5 OOP機構30年史 - Perl 5's OOP Mechanism over the past 30 years
moznion
1
940
RuboCopのカスタムCopを書いてContributionしてみる - Contributing a Custom Cop to RuboCop: A Hands-on Experience
moznion
0
68
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
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
1
360
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
170
型情報を用いたLintでコード品質を向上させる
sansantech
PRO
2
170
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
200
プロダクト組織で取り組むアドベントカレンダー/Advent Calendar in Product Teams
mixplace
0
500
【re:Invent 2024 アプデ】 Prompt Routing の紹介
champ
1
280
20240522 - 躍遷創作理念 @ PicCollage Workshop
dpys
0
170
【令和最新版】ロボットシミュレータ Genesis x ROS 2で始める快適AIロボット開発
hakuturu583
1
1k
Oracle Cloudの生成AIサービスって実際どこまで使えるの? エンジニア目線で試してみた
minorun365
PRO
4
320
Web APIをなぜつくるのか
mikanichinose
0
890
[Oracle TechNight#85] Oracle Autonomous Databaseを使ったAI活用入門
oracle4engineer
PRO
1
170
AWS環境におけるランサムウェア攻撃対策の設計
nrinetcom
PRO
1
280
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
The World Runs on Bad Software
bkeepers
PRO
66
11k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Raft: Consensus for Rubyists
vanstee
137
6.7k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Six Lessons from altMBA
skipperchong
27
3.5k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
49
2.2k
Typedesign – Prime Four
hannesfritz
40
2.4k
Side Projects
sachag
452
42k
Agile that works and the tools we love
rasmusluckow
328
21k
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
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
͓ΘΓ