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
Simple組み合わせ村から大都会Railsにやってきた俺は / Coming to Rails from the Simple
moznion
2
1.3k
AIレシート読み取り機能をRuby on Rails on AWSで実現するLLMにまつわるアレコレ / AI-based receipt reading function powered by LLM on Ruby on Rails
moznion
1
7
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
950
RuboCopのカスタムCopを書いてContributionしてみる - Contributing a Custom Cop to RuboCop: A Hands-on Experience
moznion
0
69
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
Other Decks in Technology
See All in Technology
【令和最新版】ロボットシミュレータ Genesis x ROS 2で始める快適AIロボット開発
hakuturu583
2
1.5k
AWS re:Invent 2024 ふりかえり勉強会
yhana
0
710
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
6
54k
最近のSfM手法まとめ - COLMAP / GLOMAPを中心に -
kwchrk
8
1.8k
能動的ドメイン名ライフサイクル管理のすゝめ / Practice on Active Domain Name Lifecycle Management
nttcom
0
340
Godot Engineについて調べてみた
unsoluble_sugar
0
180
rootful・rootless・privilegedコンテナの違い/rootful_rootless_privileged_container_difference
moz_sec_
0
130
20241125 - AI 繪圖實戰魔法工作坊 @ 實踐大學
dpys
1
450
知っててうれしい SQL について
greendrop
0
120
CDKのコードレビューを楽にするパッケージcdk-mentorを作ってみた/cdk-mentor
tomoki10
0
120
Alignment and Autonomy in Cybozu - 300人の開発組織でアラインメントと自律性を両立させるアジャイルな組織運営 / RSGT2025
ama_ch
1
2.1k
AI×医用画像の現状と可能性_2024年版/AI×medical_imaging_in_japan_2024
tdys13
1
1.3k
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
229
18k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
113
50k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
860
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Music & Morning Musume
bryan
46
6.3k
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
͓ΘΓ