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.2k
開発で使える 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
820
kix_009_20190429
inokappa
0
820
2019-04-18 CircleCI Meetup Fukuoka #1
inokappa
2
8k
隙間時間を使って exercism.io を始め隊 | リモートで勉強会 #2
inokappa
0
410
Congratulations fukuokarb#100
inokappa
0
3.9k
moto を 'もっと' 使おう/PyFukuoka#4
inokappa
0
4.5k
github-enterprise-user-kai-desuyone
inokappa
0
100
Elixir and AWS Tutorial
inokappa
0
550
AWS Step Functions で検討する crontabless architecture/20170824_serverless_meetup_fukuoka#1
inokappa
1
750
Featured
See All Featured
Bash Introduction
62gerente
608
210k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Navigating Team Friction
lara
183
15k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
810
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Making Projects Easy
brettharned
116
5.9k
Raft: Consensus for Rubyists
vanstee
137
6.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
We Have a Design System, Now What?
morganepeng
51
7.3k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
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