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
900
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
フルカイテン株式会社 採用資料
fullkaiten
0
40k
Terraform Stacks入門 #HashiTalks
msato
0
350
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
660
強いチームと開発生産性
onk
PRO
33
11k
Terraform未経験の御様に対してどの ように導⼊を進めていったか
tkikuchi
2
430
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
560
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
2
270
EventHub Startup CTO of the year 2024 ピッチ資料
eventhub
0
110
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
3
490
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
140
[FOSS4G 2019 Niigata] AIによる効率的危険斜面抽出システムの開発について
nssv
0
310
AGIについてChatGPTに聞いてみた
blueb
0
130
Featured
See All Featured
For a Future-Friendly Web
brad_frost
175
9.4k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Happy Clients
brianwarren
98
6.7k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
BBQ
matthewcrist
85
9.3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
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
͓ΘΓ