Slide 1

Slide 1 text

ग़ுʂ #DevelopersIO ITٕज़ϒϩάͷதͷਓ͕ޠΔษڧձ #3 ˏ2024/04/18 Amazon EventBridge Pipes : A Decoupled Odyssey GitHub/DevelopersIO : @quiver 1

Slide 2

Slide 2 text

2 λΠτϧ͚ͩΛେ͖͘ݟͤ·͢

Slide 3

Slide 3 text

3 SQSίϯγϡʔϚʔૄ݁߹΁ͷཱྀ https://dev.classmethod.jp/articles/ consistent-consumer- pipelining-with-eventbridge-pipes/

Slide 4

Slide 4 text

4 ϓϩσϡʔαʔɾίϯγϡʔϚܕͷΠϕϯτ࿈ܞ

Slide 5

Slide 5 text

5 re:Invent 2022Ͱൃද https://aws.amazon.com/blogs/aws/ new-create-point-to-point-integrations-between-event- producers-and-consumers-with-amazon-eventbridge- pipes/

Slide 6

Slide 6 text

6 DevelopersIOͰ΋ೝ஌౓͕௿͍ ● EventBridge Pipes ϒϩά͸Θ͔ͣ12ຊ ● ͦͷ͏ͪ6ຊΛࣥච

Slide 7

Slide 7 text

7 SQSίϯγϡʔϚʔૄ݁߹΁ͷཱྀ https://dev.classmethod.jp/articles/ consistent-consumer- pipelining-with-eventbridge-pipes/

Slide 8

Slide 8 text

8 ϝοηʔδΩϡʔͱ͸? ϝοηʔδΩϡʔ͸ɺαʔόʔϨε͓ΑͼϚΠΫϩαʔ ϏεΞʔΩςΫνϟͰ࢖ΘΕΔඇಉظαʔϏεରαʔϏ εͷ௨৴ܗଶ ※จষͱਤͷҾ༻ݩ https://aws.amazon.com/jp/message-queue/

Slide 9

Slide 9 text

9 Amazon SQS͸15೥Ҏ্ͷྺ࢙ ● Amazon Simple Queue Service(SQS)͸AWS͕ఏڙ͢Δ ϝοηʔδΩϡʔ ● 2004೥ޙ൒͔Βϕʔλӡ༻ ● 2006೥͔ΒຊՔಇ ● 15೥Ҏ্ͷྺ࢙ ※ https://aws.amazon.com/jp/blogs/news/amazon-sqs-15-years-and-still-queueing/

Slide 10

Slide 10 text

10 SQSίϯγϡʔϚʔͷૄ݁߹΁ͷཱྀ 1. ϞϊϦε࣌୅ 2. Lambdaͷ஀ੜ 3. EventBridge Pipesͷ஀ੜ ※ਤͱจষͷҾ༻ݩ https://aws.amazon.com/jp/message-queue/

Slide 11

Slide 11 text

11 ϞϊϦε࣌୅

Slide 12

Slide 12 text

12 ϞϊϦε࣌୅ ● ΞϓϦ͕͢΂ͯͷSQSૢ࡞Λ࣮૷ ○ SQSΛϙʔϦϯά ○ ϝοηʔδΛड৴ ○ ϝοηʔδΛॲཧ ○ ϝοηʔδΛSQS͔Β࡟আ ● ࣮ߦج൫ ○ EC2+AutoScaling౳Ͱ ϝοηʔδ਺ʹԠͯ͡εέʔϧ

Slide 13

Slide 13 text

13 ϞϊϦε࣌୅

Slide 14

Slide 14 text

14 Lambdaͷ஀ੜ

Slide 15

Slide 15 text

15 Lambda࣌୅ ● re:Invent 2014Ͱൃද ○ SQSૢ࡞ΛΠϕϯτιʔεʹΦϑϩʔυ ○ Lambda͸ϝοηʔδ࣮૷ͷΈ ● ࣮ߦج൫ ○ ϝοηʔδ਺ʹԠͯ͡ Lambda͕͍͍ײ͡ʹεέʔϧ

Slide 16

Slide 16 text

16 Lambda࣌୅ ● Πϕϯτιʔε͸LambdaͰࢦఆ͢ΔτϦΨʔ

Slide 17

Slide 17 text

17 Lambda࣌୅ ● ड͚औͬͨSQSϝοηʔδΛॲཧ͢Δ͚ͩ ● ΞϓϦέʔγϣϯ͸SQSΛҙࣝ͠ͳ͍ ● Lambda࣮ߦϩʔϧͰΠϕϯτιʔεͷߦ͏SQSΞΫγϣϯΛ ڐՄ ○ sqs:ReceiveMessage ○ sqs:DeleteMessage ○ sqs:GetQueueAttributes

Slide 18

Slide 18 text

18 EventBridge Pipesͷ஀ੜ

Slide 19

Slide 19 text

19 EventBridge Pipesͷొ৔ ● re:Invent 2022Ͱൃද ● SQSૢ࡞ΛLambda͔ΒPipesʹҠಈ ● ίϯγϡʔϚʔॲཧΛ3෼ׂ ○ ιʔε(SQS) ○ ϙʔϦϯά(Pipes) ○ λʔήοτ(Lambda) ● ιʔε΍λʔήοτ͸ ϓϥΨϒϧ

Slide 20

Slide 20 text

20 EventBridge Pipesͷొ৔ ● ॲཧํ๏͸LambdaΠϕϯτιʔεͱಉ౳ ● Lambda࣮ߦϩʔϧʹSQSΞΫγϣϯ͸ෆཁ

Slide 21

Slide 21 text

21 EventBridge Pipesͷొ৔ ● PipesʹٻΊΒΕΔΞΫγϣϯ ● ιʔεૢ࡞༻ ○ sqs:ReceiveMessage ○ sqs:DeleteMessage ○ sqs:GetQueueAttributes ● λʔήοτૢ࡞༻ ○ lambda:InvokeFunction

Slide 22

Slide 22 text

22 EventBridge Pipesͷ͓͔͛Ͱ ୭͕ԿΛ΍Δͷ͔໌֬ͳૄ݁߹ʹ!

Slide 23

Slide 23 text

23 Amazon EventBridge Pipes : A Decoupled Odyssey