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
開発で使える AWS の API 操作を模倣する (OSS) ツールを探してみた/JAWS-U...
Search
Yohei Kawahara
October 19, 2018
1
1.1k
開発で使える AWS の API 操作を模倣する (OSS) ツールを探してみた/JAWS-UG Kagoshima Vol.8
JAWS-UG鹿児島勉強会 Vol.8 (
https://jawsug-kagoshima.doorkeeper.jp/events/79902
) でトークさせて頂く死霊です.
Yohei Kawahara
October 19, 2018
Tweet
Share
More Decks by Yohei Kawahara
See All by Yohei Kawahara
20191002_CircleCIMeetupFukuoka#2
inokappa
1
780
kix_009_20190429
inokappa
0
780
2019-04-18 CircleCI Meetup Fukuoka #1
inokappa
2
7.9k
隙間時間を使って exercism.io を始め隊 | リモートで勉強会 #2
inokappa
0
380
Congratulations fukuokarb#100
inokappa
0
3.8k
moto を 'もっと' 使おう/PyFukuoka#4
inokappa
0
4.3k
github-enterprise-user-kai-desuyone
inokappa
0
97
Elixir and AWS Tutorial
inokappa
0
520
AWS Step Functions で検討する crontabless architecture/20170824_serverless_meetup_fukuoka#1
inokappa
1
740
Featured
See All Featured
A Philosophy of Restraint
colly
202
16k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
123
18k
Six Lessons from altMBA
skipperchong
26
3.3k
Large-scale JavaScript Application Architecture
addyosmani
508
110k
The Cult of Friendly URLs
andyhume
76
5.9k
Intergalactic Javascript Robots from Outer Space
tanoku
268
26k
Unsuck your backbone
ammeep
667
57k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
41
6.5k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
225
22k
VelocityConf: Rendering Performance Case Studies
addyosmani
321
23k
Done Done
chrislema
180
16k
Pencils Down: Stop Designing & Start Developing
hursman
118
11k
Transcript
։ൃͰ͔ͭΏͬ AWS ͷ API ૢ࡞Λ฿͢Δ πʔϧΛΈ͚ͯ͠Έͨ1 JAWS-UG ࣛࣇౡษڧձ Vol.8 @inokara
1 ࣛࣇౡห༁: ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ (OSS) πʔϧΛ୳ͯ͠Έͨ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 1
ࢲ • ݪ ༸ฏ (͔ͬͺ) • ΞΠϨοτגࣜձࣾ • ࣛࣇౡग़Ͱ͝Θ͢ •
Github: inokappa • twitter: @inokara • Facebook: inokappa ࣮Ոਅ࠭ͳͷͰ, ࠙ձ͕ऴΘͬͨΒ ਅ࠭ʹؼΓ·͢. ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 2
એ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG
ࣛࣇౡษڧձ Vol.8 3
JAWS-UG Ԭۙล͔Β͖·ͨ͠ʂ ΄΅ຖि͘͘ձͬͯ·͍͢ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ
| JAWS-UG ࣛࣇౡษڧձ Vol.8 4
Զͷπʔϧζ oreno.tools ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ |
JAWS-UG ࣛࣇౡษڧձ Vol.8 5
એ ऴΘΓ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ |
JAWS-UG ࣛࣇౡษڧձ Vol.8 6
AWS ͷ API ૢ࡞ͬͪ ͍Ί࣮ͬߦͬ࣌͢ ۓுͬ͢Ͳͳʔ2 2 ࣛࣇౡห༁: AWS ͷ
API ૢ࡞ΛॳΊ࣮ͯߦ͢Δ࣌ۓு͠·͢ΑͶ. ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 7
γεςϜ։ൃͰ ίετͰ͚ͬͩ͘ ͔͑ͨʔ3 3 ࣛࣇౡห༁: γεςϜ։ൃͰίετग़དྷΔ͚͍ͩ͑ͨͰ͢ΑͶ. ։ൃͰ͑Δ AWS ͷ API
ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 8
ςετͰ ࣮ϦιʔεΛ͔͔ͱ ͓͡Ͳͳ͋ʔ4 4 ࣛࣇౡห༁: ςετͰ࣮ϦιʔεΛ৮Δͷͬͯා͍Ͱ͢ΑͶ. ։ൃͰ͑Δ AWS ͷ API
ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 9
ͦ͛ͳօ͞Μʹ Ͳͯ͠Μ࿕ใͰ͢5 5 ࣛࣇౡห༁: ͦΜͳօ͞Μʹ͓ͦΒ͘࿕ใͰ͢. ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ
OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 10
AWS ͷ API ૢ࡞Λ฿, API ޓ ͷ OSS ͕ ৭ʑͱ͍͋͢6
6 ࣛࣇౡห༁: AWS ͷ API ૢ࡞Λ฿, API ޓ ͷ OSS ͕৭ʑͱଘࡏ͍ͯ͠·͢. ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 11
ͦ͛ͳ OSS Λ͍͔ͬ͘ ݟસͬͯΈͨ͠7 νΣετʔʂʂʂ 7 ࣛࣇౡห༁: ͦΜͳ OSS Λز͔ͭݟસͬͯΈ·ͨ͠.
։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 12
DynamoDB Local • https://docs.aws.amazon.com/ja_jp/amazondynamodb/ latest/developerguide/DynamoDBLocal.html • DynamoDB ͷجຊతͳػೳΛϩʔΧϧڥͰఏڙ, AWS Φϑ
Ογϟϧπʔϧʂ • σʔλͷ put ग़དྷΔ͠, scan ग़དྷΔʂ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 13
SAM Local • https://github.com/awslabs/aws-sam-cli • Lambda ؔ API Gateway ΛϩʔΧϧڥͰ࣮ߦग़དྷΔʂ
• S3 DynamoDB ͷαʔϏεͷݺͼग़͠ΛΤϛϡϨʔτʂ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 14
localstack • https://github.com/localstack/localstack • Lambda ͱ͔ API Gateway ͱ͔ϝδϟʔͳαʔϏεͷ API
Λ αϙʔτʂ • Web UI ͕༻ҙ͞Ε͍ͯΔʂ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 15
moto (moto_server) • https://github.com/spulec/moto • Python ͷ mock ϥΠϒϥϦ •
αϙʔτ͢ΔαʔϏε͕ localstack ΑΓ͍͔ • ϥΠϒϥϦ൛ͷ moto ͱαʔόʔ൛ͷ moto_server ͕༻ҙ͞ Ε͍ͯΔ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 16
elasticmq • https://github.com/adamw/elasticmq • SQS ޓͷΠϯλϑΣʔεΛఏڙʂ • Scala Ͱ࣮ ։ൃͰ͑Δ
AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 17
minio • https://github.com/minio/minio • S3 API ޓͷΦϒδΣΫτετϨʔδ • S3 ͷΑ͏ͳ
Web UI උ͍͑ͯΔ ͔ͳΓͷߴػೳͰ SDK ༻ҙ͞Ε͓ͯΓ, ଞͷΫϥυαʔ ϏεΦϯϓϨ্ʹల։࣮ͯ͠ࡍʹӡ༻͢Δ͜ͱఆ͞Εͯ ͍Δײ͡Ͱ͢. ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 18
dynalite • https://github.com/mhart/dynalite • DynamoDB ͷػೳΛఏڙ͢Δ࣮ kinesalite • https://github.com/mhart/kinesalite •
Kinesis Stream ͷػೳΛఏڙ͢Δ࣮ ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 19
Ұཡ (1) ໊લ ରαʔϏε ϥΠηϯε DynamoDB Local DynamoDB Amazon ϥΠηϯε
SAM Local Lambda ଞ Apache License 2.0 localstack Lambda ଞ Apache License 2.0 moto EC2 ଞ Apache License 2.0 ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 20
Ұཡ (2) ໊લ ରαʔϏε ϥΠηϯε elasticmq SQS Apache License 2.0
minio S3 Apache License 2.0 dynalite DynamoDB MIT License kinesalite Kinesis MIT License ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 21
୳ͤͬͱ͋Δͣ... ͡ΌͬͲΜ... ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ |
JAWS-UG ࣛࣇౡษڧձ Vol.8 22
ग़དྷΕ...σϞ ͜ΕΒͷπʔϧ HTTP ͷΤϯυϙΠϯτΛఏڙ͍ͯ͠ΔͷͰ, ҎԼͷΑ͏ʹ, ΦϓγϣϯͰΤϯυϙΠϯτΛࢦఆͯ͠ར༻͠ ·͢.8 aws --profile=dummy \
--endpoint=http://xxx.xxx.xxx.xxx:1234 \ s3 ... 8 AWS CLI Ͱͷར༻ྫͰ͢. ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 23
࠷ޙʹ • ࣮ϦιʔεΛ࿔ΔલͷૉৼΓʹΦεεϝ͡ΌͬͲʂ • ͋͘·Ͱ։ൃ༻్͓ࢼ͠༻్Ͱ͍ͬͯ͘Μͤʂ • ୳ͤͬͱ৭ʑͱग़ͯ͘Δͣ͡ΌͬͲͳ͋ʂ • Let's ΤϯδϣΠ
AWS !! ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 24
ᄠ͔͍͜ ΅͔͍ ᄠ͜Α͔ͬ ͻͬ !! ։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ
OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG ࣛࣇౡษڧձ Vol.8 25
։ൃͰ͑Δ AWS ͷ API ૢ࡞Λ฿͢Δ OSS πʔϧΛ୳ͯ͠Έͨ | JAWS-UG
ࣛࣇౡษڧձ Vol.8 26