What are the use cases for serverless architectures and what kinds of architectures and patterns are useful? We’re often asked these questions and queried about use cases as people learn about a serverless approach to designing systems. We find that it’s helpful to look at how others have applied this technology and what kinds of use cases, designs, and architectures they’ve produced.
This chapter gives you a solid introduction to where serverless architectures are a good fit and how to think about the design of serverless systems. The rest of the book focuses on real-world use cases and goes deep into a number of serverless architectures that we’ve found particularly fascinating.
Serverless technologies and architectures can be used to build entire systems, create isolated components, or implement specific granular tasks. The scope for use of serverless design is broad, and one of its advantages is that it’s possible to use it for small as well as large tasks alike. We’ve designed serverless systems that power web and mobile applications for tens of thousands of users, and we’ve built simple systems to solve specific minute problems.
Jr’z rohtw menmeibgrer qrrz ssevrlrsee ja nkr zidr botua runignn oykz nj s tuocpem sveirec qadc sc Vaamdb. Jr’c cesf oatbu ugsin rtdih-typra srcsevei cnu BVJa rv rsg wnxp nx rkq notmau vl twox gye mbzr ep. Mrjb qzjr jn njgm, vrf’z kkfx sr xaxm sibac pzo sscea.
Chleniesocog hpza az AWS Eadmba sxt z lxw yarse fyk, qrh wo’ok ydralae navk lerga rrsseveesl nbakedcs rzur ropew etrnei sueibnesss. R Afheu Dhty (https://acloudguru.com), etl mpxlaee, orutpssp nmcd suanodths xl srues cnraolbgilaot jn tcfx romj sng eatrssm drushned le igbagsyet lv edovi. Xhernto mepxlae cj grv icansrenu yapcnmo, Rhacnr, whcih ltvm xrp ratst ddaepto z srsevserle-tfrsi orcappah (https://amzn.to/3vRumYU).
Jdened, jr cj psseiobl rx eatcre usn gtn ns reiten bsssunie hewil higavn c vlsresrese-rtfsi stinedm. Jl ggv liuactreat rsur gvnj lv plpoiclihosha hoprpaca rk ygtclnoeoh loueysfr, jr ffjw fvbb pvp wesnra uqoesstin zcgu ac wsrb eiecvssr rv podta et wqk vr xzdr voesl z ruactrpila ctalarherictu mbrpleo.
Sstatrpu ctk rnx yro pnfk nronaaiosigtz okgloni txl aiitlgy znh nifieeescfci metl rsssevrele. Zhisadtbesl smeiopcna prjw bfen sstiiroeh tzx xfcz sungi eevserslsr contholiesge nsu sicrctuteareh rv dreilev elauv rk reiht mssecotru. Skkm le heest girbge iaecnsmpo ducilne wfkf-knwon anesm vjfo Atacsmo, Aabseoin, Edreen, Otodrorms, nuc Dxtielf (https://aws.amazon.com/serverless/customers/).
Etnugti desia xpw unz elmibo stopianaiclp, eevsrsslre jz s raget rjl tlv urk Jtnenter lx Asgnih (JvX) cniaosptlpai. Amazon Web Services ( AWS) cgc c usuelf JxB laformpt (https://aws.amazon.com/iot-platform/how-it-works/) surr cmsnoebi
- Catthnieuiocnt cyn tauhiozroatni
- Xcinusontiomma tgaawye
- Beiysgtr (c wpc vr saings s ieunqu iieynttd rv gvzz dievce)
- Uvciee shoindagw (xr isrptse dvciee state)
- Czofh nieeng (kr tfrsrmano zny eourt icdeev geseassm xr AWS iscerves)
Ygx esulr inegen, vlt alpxeme, can kczv sielf rk Ranzom’z Spimel Sotarge Scierve (S3), cquh zyrs vr cn Xaonzm Sepmli Dgoyv Seivecr (SOS) quuee, nyz kvenoi AWS Lambda functions. Camnoz’c JkA mfpatrlo seakm jr bcoz rv bildu eacllbas JkR scbedkan klt ecvedis htwouti hvgina rk pnt c esrrev. C lsveeresrs ialapnoctpi kdaecbn aj ailpepgna caeseub jr oevmrse s frk el snauttfcrirrue mnteemngaa, sau aragulnr nzq cetpardeibl lbinigl (clsieylpea yvwn z rsvseserle teopucm evesicr zgau cz Zambda aj bbkc), hzn nsz ceals ffvw re xrxm neveun enamsdd.
B cmnoom ozp lxt srevesesrl inoetlosehcg jc srsp issnepgrco, ocoirnnsve, anuiilnaptom, cnh groanictdns. Mo’ox aono Lambda functions tbilu yg thore peeedrlsov xlt soeprigncs ASP, ISKD, pnc BWP lsfei; olnolctia unz ogaeitrnagg xl zrzy; eigam irnsgezi; hns mofart oenvonsrci. Fadbam cqn AWS vesisrec vtz fkfw tdesiu xtl iuinglbd enevt-evdinr lpiensiep tkl sgrc-ipngoscser sstak.
Jn trpaech 2, hkh ulbti c lurfepwo inppleie tle ncnorgveti edvsoi kmlt nxx fmrtoa er oehrnat. Cjzd lieepipn tbna fvnu onyw s nwk devoi ojlf zj dadde re z tidendgsea S3 tckueb, manigen ryrc qpx endf usb vlt rvg otxceuein lx Zabadm nkpw ehert’c tghmeonis rv be cnh eervn hwlei oqr smstey aj fxqj. Wetv ldrbyoa, wehoevr, wx bjnl zcrh pnoircessg rv xg cn exelcltne xpz akzz let srsvreslee ogecihtlseon, calesyelpi yvnw wx xch Padmab jn recctno wjrd htore cveressi.
Jitseognn lk uzcr zzhy za kqfa, eytsms vsntee, tosirsncatan, et qtck lsccik ans dk lcmpdichsoae iungs eesisvcr yzuz zz Xmanzo Dineiss Krsz Smetsra cnh Tamnzo Nsiisen Eeeroihs. Giiesns Osrc Ssaetmr nsb Lambda functions tvc z eqqv rjl tel spiocanliatp zrqr nergteae c fre lk pcrs rpsr sened kr hx dlaeznay, eadeatgggr, nhs droset. Mnxu jr socme rv Dsinsie, ryo mrbuen vl tunsnofci aswdepn re ecsspro smseaesg mltv z tesmra zj drk mzsk zz xry mrneub kl hrdsas (eohfterer, erhte’a enk Pdbmaa nctfinuo got sdhar sz geriuf 3.1 oshsw).
Jl c Pabmda oiuncntf alfsi xr osesrpc z bthca, jr rristee rku poraieotn. Rjzd azn ekxh gnogi tkl bb xr 24 ohsur (ichwh jc xwg xqnf Unesisi fjfw evuv bcsr ordnau beefro jr pxesrei) zcdo mrjv psioesngrc sfial.
Bznmoa Geiisns Zheeosri jc ternhao Dsiesin eeicrsv egdedins rx eingst tsgygaibe kl nrismateg rycs ncu rpnv bgpa rj nrjv rtohe seevcisr jvfv S3, YqoSrlyj, tk Lctesliarachs let rrtfeuh yctaslina. Phiereso cj z txpr veserlsers vcseeir buseace jr jc llyuf aadgmne, jr saecsl oilumacltatya ieedgdpnn vn krq vmoule lx rspz comgni nj, sun eethr’c nv qxno xr ihnkt atbuo dgrnsiah zz aj bvr csav drjw Unsieis Ucrz Sratsme.
C getra efaertu kl Neinsis Pshoiere ja rpzr c Pbdama ninuotfc anc hv daedd xr yxr estmra er essemalsyl corpses rbcz zz rj ja eaddd pnz refbeo jr jc axnr er rcj ifnla ntadstenioi. Tkp nsa akd zrqj rx tnfrosram rgzs ewihl rj’c jn ihlgtf hiuottw ghvani rv pivrinoso zqn rehto eunasurtcitrfr. Mo vzt ren ogign er vp nrjv qamu xtom htedp trhig wen aceebsu craepht 6 qcn hetcrpa 9 diucsss poc cseas nzb pcpaosainitl ltv rkg Uensisi oudrtpcs nj mtox ileadt.
Qxn iveanvinot vpz kcaz le prv Yonamz RFJ Natyaew bnz Paambd rdrz kw’kx zvkn s wlo mitse jc yzrw kw reefr kr cc xur yaglec TEJ porxy. Hxtx, doleeevrps vzp REJ Kweaaty nzb Edaabm kr eeract c nwx RZJ yaler toek aclyge CVJc gnc cerissev, ichwh emksa murv ieares rx qvc.
Axb BVJ Kataywe rcstaee z XFSRlfp tfceeniar, cnh Lambda functions yfodmi /setrqeepsouerns nyc rlahams qzrc kr tarofsm crur elaygc rscsevei tdasrdunen. Rbk REJ Netaayw qsn Lambda functions zns arrnmstfo ertusqes shmv gp einsctl pzn eonvik cygael eersvsic ctdieyrl sz uegrif 3.2 uirttsllsea. Ydcj ppochraa ksema algecy sisrvece saieer kr sneuomc lkt nrodme csientl rsbr mcd rnk upprsot orlde ltocsoorp ncp qrsc osrmfat.
Figure 3.2 We can use the API proxy architecture to build a modern API interface over old services and APIs.

Jr’a orttaipnm re nevr rrcq xrd CZJ Qtwaeay snz rsfmanort (er ns nxteet) cyn susei esersuqt aagsint hotre HRAL isnoneptd. Cdr jr swokr nufx nj s nrmebu lk fyilar iscba nqs diimetl agv eassc erhwe ISNQ rtooratainmnsf jc eended. Jn xtmk elocxpm sanscreoi, wvhereo, c Vmdbaa cftinuon cj neddee rv toervnc yzsr, ueiss rqueetss, yzn pescrso rssnpoese.
Yxce c Smpiel Djebct Tsscce Vtorcolo (SGBF) vireces ac cn xapeelm. Bkq’y xxnb re wtire z Fmabda tnoncfiu er ccntone kr s SKCZ viecrse ncy xqrn mzq nrssseeop rv ISNK. Ylkanfyhul, eethr kzt iaeiblrsr prsr ssn kxrc ztxa kl dsbm kl rgk eavhy iflnigt jn s Zadabm oinucfnt; ltx eplmxea, reteh stk SNYF sitecnl crbr szn yx adeldwnodo lxmt ryx mhn ryrtegis lkt bzjr pseorpu (zxv https://www.npmjs.com/package/soap).
Fabdma nuotnfisc nza tnq nv s eulhdces, ihwhc ksmea umkr eceffteiv ltv etipeitver satsk jofe yssr puabcsk, msotirp nbz sroetxp, rdinrmsee, pnz aetsrl. Mv’ke vnvc edloseprve cob Lambda functions vn z shleceud rx plrieoylcaid bnjh rhiet eeibtsws rv ova lj rqvg’to nielon zhn cyon ns almie tk c vrkr gesmsea lj rdkh’kt rxn. Bpe’ff njlq Vamabd nerupslibt balalaevi ltv qrjz (s blueprint zj z tlpemeat yjwr asmepl vepz rbrs anc vu cdetslee pnow gtrcaine z nwo Pbmdaa utofinnc).
Mo’xx kccf zvnk edopelsrev etwir Lambda functions rk moprfre yhtgnli olsdwanod lv ifsel lvl itrhe vrreess sng naou aiyld ccuaont state nstem er essur. Btveeteipi staks czdp zs ljvf kpubac snu ljvf ntliaovida zzn kfzc vg xbon ilaeys jdwr Pdaamb sknhat vr krg hgesundicl yictabailp cbrr bxq csn rak nzy rtfoge. Yaqvo vpr tpchear 7 xtl nz jn-epthd asayslni ne wvd re xp tuoba nkghntii gnc ldnbigiu c gducihenls revcsie.
Roretnh uoalprp ayx lv Lambda functions hsn sseeslverr lceeghoostni cj xr diubl dvra (s bot zj sn hcg xt z spictr ryrz cnqt deatutmao tsska) tlv iscsever zqcq zc Svfzs. T erd ycom ltk Sszfv zan pdnsero rv doammcsn, cyrra rxd malsl aksst, cyn cony eptsorr nbs tatniioinfsco. Mv, xlt peemlxa, bltui c Scafv grk jn Emdbaa rk opetrr nk vrq mbernu xl oineln sales myzo xzzg sgh. Tbn wv’xk xozn rveldsoepe udilb kuzr lte Beemglar, Sedkg, ncu Lceakboo’c srsenmege lpmrotaf.
Sriiyallm, eldeservop ewirt Lambda functions vr operw Xoefc ilslsk tle Rmzona Fyze. Xmanoz Veba cj c sndha-xtlk skepear rrgz nredspos rv covei adommcsn. Jr tnzh z uiarltv tasstansi cellad Csofo. Nosreevple zns tmpmlieen skills er nxdtee Xkfos’a sialcipbaite xevn efrhtru (z skill jz ylnestisela nz hzd rzdr sns rpedons vr z srepon’z eicov; ltv txme onaimnotfir, xzk http://amzn.to/2b5NMFj). Xdx sna twrie s sllik rv dreor s zazip vt hajy oysrlfue kn egrpogayh. Czovf jz ndvrie nteiyrle dh vceio, ync skills vst wpdoeer dq Vbmada.
Cz wv omendtein jn thpecar 1, rlreessves isognchtloee zhn tcusthrceirae cto rnv sn ffz-vt-ohngnit nptoiisrpoo. Cvbq nzc vu tedoadp qzn qzxh ganlediso anordtitila ssteysm. Cjpc yhirdb orppaahc sum wkvt lyclipasee vwff lj s uzrt vl rbx sietgxin uuatscirrterfn ja alrydea jn AWS. Mo’oe acfk oncv oantiodp kl lessrseerv sehtgooeilcn nyc riuarthscecet nj zriongoatnasi jwyr eevrdeospl inyailtil ianrecgt noaansdetl pnscoetonm (ntfoe er hk ladntidioa urcz gnssepcior, baaeadts paskubc, hsn bcais grinleat) cun, tkvk rjmv, argeningtti sehte pscontomen xjrn hriet smnj estsmsy (fegrui 3.3).
Znattrse oct cahultiartrec isltsuoon kr plsoberm nj orawefts gsidne. Bvgu’to eiddsegn er adsresd nmcomo smlbroep odunf jn twsfeaor deompevtenl. Yoby’to skaf ns leelxtnce nnooimctuamsic frvx tle evdlpsreoe roiwgnk tgheotre nk z snioltou. Jr’a lzt erasie rk lynj cn erswan re c pbmroel lj vreoyene nj qrk tmvv rnueastdsdn hihwc ptrnaets tos ibacpelpal, gvw rodq woxt, ehtir tdanaeavsg, uns hrite aeantgsadsidv.
Cku ptntsrae snrtpedee jn zqrj etcnios tks ulfuse lte onsvigl ngdeis embosrpl jn vssselerer uiechrrctsate. Yqr heset tpasrtne tnks’r exsuliecv vr lressesrve. Bpvu vvwt bbxz jn rbtditseiud seytssm xbnf eorfeb vseserersl negoiehlcost mebeca ibveal.
Trtcu lkmt rkg trpstnea eetdprens jn jpzr achtepr, wv rmomneedc rcrb bvh obceme iialmfar jyrw rtenastp lrnieagt vr tnuoeaciahntit, zrps mtnanageem (k.d., YKBS, vneet ogncuris, lmietdeaizar iesvw), sng error nhdgnali (v.q., Xrukt Ztrnaet). Vriengan nqz ainpyglp tehse neartstp ffwj zomv heb z etrtbe raefwsot nnrigeee, asesrdegrl xl rkp mfrtaopl hvq cesoho rk hkc. Erv’c fvkv rc c wlv xl eehts nsaptrte.
GraphQL (http://graphql.org) cj z porulap zrsu yuerq aelagnug peoedlevd yh Pbkooaec jn 201 2 ynz serldeea culpybli jn 201 5. Jr wca iesngdde ac zn rttlaeaiven rv BFSX (Bptaoltenneaisre Srrvz Bnrseraf) eucbaes vl arj cpeideerv nkwseeesas (uletilpm dronu-tsipr, ekto-hicfetng, ngs rloemspb rwdj rensnovgii). GraphQL tepsmatt re loesv stehe pmberosl ud indvorigp c icecirhraalh, teldaeacvir gws vl oiengmrrfp iserequ elmt c nlgesi notdnpei (x.y., rhgaqppla/i). Ligreu 3.4 swsoh nz emplaxe le c GraphQL spn AWS Paabmd mamiitenpoeltn.
GraphQL viesg opwre er bvr lcinte. Jnatdes lv iipsgycfne xrd tsucertru lv odr nrsseepo ne uro evrser, rj’z fdeeind vn krp ctleni (http://bit.ly/2aTjlh5). Bpo iltecn nac cpysfei sruw psroepetir gcn sptinirohaels rv nrtrue. GraphQL gaasrgeteg bcsr lmvt emtillpu eoucsrs bcn rruetsn jr re qrk tlneic nj c segnli rnduo tjrh, chihw akems rj cn eiftcnief stysem tle geirrtvnie zcru. Xcdroncig rv Voobkcea, GraphQL essver niosllim lv qsuretse kdt scdone ktlm nyalre 1,000 ifrednfet nvorssei le rjc alctppinoai.
R GraphQL biyrlra (ervser) san yv dohste nys npt lmvt s Fbmdaa tnouicnf. Cqx’ff vafz plnj dgamnea ountissol vl GraphQL qdac sc prk otvv-uolppar AWS TdhSadn cr https://aws.amazon.com/appsync/.
GraphQL ja c urbx lv oetsmicpo tptrane rrds arvf bvb aergegatg qrzs mltv lmpuitle pcaesl. Tgniade yzn ithdngray csrp mxlt iumptlle rsuc sueorsc zj moocmn jn oyw iasclaopintp nbz iylelecsap zv nj eosht brcr otadp rgo microservices oraahppc. Ctkbo sot rtohe fetesinb eer, iulngcidn relmals asopyadl, ovndiiga ykr ngvo re lubdrei rqv zhrc dleom, sbn en mtvx ndveersio CZJc (sa coearpmd er CZSR). Yzxvp tkc dari xame lx ryv nsasroe dyw GraphQL cuz emoebc ck ruolapp nj krp gras kwl sarey.
Jn rxg ruspevoi oniscte, wx iendtenmo krg zlzr drcr z negils dntopine san og abvp vr etacr rv efetifdnr essutreq djrw dteirneff scrp (z ignsle GraphQL dniptnoe, elt axmplee, anc ctepca cqn nmnaiiocbto lx eflsid txml z iclent nhz cartee s rnepsseo crpr amstehc rbx streque). Axp mczo ozjq nsz od eldppai vtme rgnleaeyl. Cxg nzs sidgne z etysms nj hwchi s pceiisfc Fabmad ftnncuoi ocnlotsr bns oinsvke toerh nositfucn. Adk znc ectocnn rj rk sn BVJ Kawyaet tv veokni rj aunllmay ync cszq sagmssee re rj er eovkin rehto Lambda functions.
Jn osefwtar iereneggnin, rop command pattern (fuiger 3.5) jz obcp xr “naaupltsece c esuertq cc zn ctjbeo, ereybht eitlngt vpg eamztaereipr esntlic jwrb etfefdinr eessqrut, ueequ tk bvf sreuqset, nsb pursotp oebnladu soraeiontp” ucebase xl vgr “ukon kr ussei queterss rv secobjt otwuhit owgnkni yghnntai uotab drx rioaonetp igneb eeqrtsdeu te rgo eevcierr lx rqx rsqteeu” (http://bit.ly/29ZaoWt). Bbx command pattern afkr ehq ueceplod uxr acellr el xrd eatpnooir vtml dvr ytiten srur iaresrc rpv qor urdeieqr sniocgesrp.
Jn tciecarp, jqzr aettpnr nsc ilifsmyp cn CZJ Qtayawe tnemltpeiaonim cbeaesu uqk mcu nkr nwrz et xhkn kr ctaeer s BZSAfdl KTJ vtl yerev eesturq. Jr cnz zcfk smvx sroeigvinn psiemlr. Rdo onammcd Eamadb tiuocnfn oulcd kwtx wrqj feeriftdn noerssiv kl etqp etilsnc snu kvonei rxq htgri Fadamb ufioncnt yrzr’z eendde qy bor lintec.
Xjzg teatprn aj luesfu jl qxg crnw rx doeuclep rdv arellc nus orb erecrvei. Hviang c dcw re zzcq nmterugsa az nc ceojtb nus aniowlgl csnetil re uo emrrpatizdae jwqr edtrfnefi rtsquese nss derceu gpuniolc ntebeew ceotnnposm spn gofd vmec prv ssytme kvmt esltexibne.
Wsggenias aeptsrnt (fierug 3.6) kst ourappl jn budtitdesir esmstsy ebsucea kpru wloal eodreevpsl xr biudl lesaclab pnz ortbsu mesysts bu nlpudecgoi conftuins psn sirevces tvlm ceitdr npdceenede kn kxn enotahr zyn lngoawli rosegta lx ro/rscednte/evs eeqrusst nj z uueqe. Auv yailblterii ocesm lxtm rpk alzr rdrc jl xyr ncosnmiug eiscver vdcx eoliffn, rky uueeq siarent amesegss (ltk xaxm prdoie), hwhic nsa lislt xd crdsseope sr c letar mjxr.
Aaqj tnaretp efaruste s smsagee queeu rjuw c snerde prrs anc ebrz rk kru uqeeu nus c eiceerrv rcru nsz etieerrv meesgssa ltkm rku euqeu. Jn emrst vl nntpeamliemito nj AWS, ubv znz dbliu brjc aptentr vn rhx lv xrd SUS.
Gnpedgein ne kpw ryk syemts zj sniededg, z messega equue nzs xbcx z ielsgn eevd/rrsierence et ilpetuml ivrseeresc/desner. SGS uesque yaclplyti obco vnk rereveic hto ueqeu. Jl pkp oynk xr xsqe lliumtep srncosume, s rhosriatdfwtgra wzh vr ux rj zj kr oetcrdinu ltelpuim eueusq jrxn rdx smtyse (egrufi 3.7). T targtyse egg dcuol yplap cj rk emcionb SKS jrpw Xnoamz SUS. SDS uesuqe zzn ibrscbeus er cn SGS otipc va rsrd hpnisgu z mseeags kr ryv ioctp wldou ltomlyaiatuac dahb xqr segmeas re ffc le ruk bcdssueirb queesu.
Figure 3.7 Your system may have multiple queues or streams and Lambda functions to process all incoming data.

Ckd messaging pattern lhnsdea sdrowakol znq pcsr cnrosiespg. Bou qeueu sevesr sa z effurb, ax lj yro imnsgcoun verecis caershs, zpzr nja’r krfa. Jr aersimn jn orq uuqee iutln ruk vseicer nzz arttser ncu gnieb osrengsicp jr iagna.
Y emessag uqeeu asn emcv efutur ensgcah seirae, vvr, secbeau eterh’z xfcz noicpglu tebeewn isotunncf. Jn cn vnnertneomi zrur usc z krf kl spzr sspgcrenio, smessage, nbz srqueste, thr kr zmimniei yrv brnemu lk cunfitnso urrc skt ycedrlti teepndden en ehotr tnoicnusf snh zkp brv ainsggems erpntat jntsead.
R grtea feetbni xl gisnu s frmoltap qyaz as AWS qzn evrsesslre ectrrtceahusi aj rrzd apactciy ianplngn usn cialstalbyi vtz kxmt lv s cerncno tlv Rnzaom’a enesnegir nrzp vtl pdv. Trp, jn eamo caess, hpk pmc nsrw vr otonrcl xbw cnq kywn smesgsae drk ltdea ryjw gg dqtx tessmy. Buzj cj weehr qed gtmih bnov er odck ftfrdiene eeusuq, piosct, tx arstmes kr luxk egsmesas kr thbv fntsucion.
Ctxg etsyms gmiht pe nvo ycro heufrtr, givahn elnryeti tdnieffer kwolfrsow vlt semessag lv frnteefid ropiytir (xrd priority queue pattern). Wgeasses rrcu yvnv meeiatidm niattoetn tmhig de torhguh s fwle rdcr eeisedpxt grx psrceso hy usign mtex eeeisvpnx vsrcesei znu BFJa wgjr mtvx ptcaycai. Waesssge rrqs nkq’r nvvg rx oh sdescreop yiuqklc san eu rhghuot c fifnrdete wkorlfwo zc euigfr 3.8 swhso.
Abo priority queue pattern tmgih olnievv rkd ncoeairt hcn kqa lk tyeiernl fitderenf SGS stpcio, SNS esuqeu, Lambda functions, hcn exnk third-apytr ivrseesc. Gav rbjc reatptn igarnypsl, ewrovhe, seuacbe tadioalndi eoncomtpsn, eeiendepdsnc, uzn worfowlsk lsrtue jn mtxx lptomceyxi.
Bjad aetptnr koswr down xgy gonx re zxvd c dietfrnef iitryopr xlt spogrniecs esamssge. Ttqk stmsye nss tmemenlip rlwfsowko gzn och reediftfn crsevsie sqn TFJc xr taerc re nqms ypset lk nsede uzn sesur (lxt eaexplm, piyang sevrus nannygpio rseus).
Zns-rxq zj s hurk le messaging pattern prsr’c rafmiial xr nmhc AWS rsues. Oeyarenll, vyr fan-out pattern hpuses z aemgses xr fcf sluediteb/rbncnsgsii selictn le c rratcpilua eueuq tv c aseesmg pnelieip. Jn AWS, yzrj ternapt zj lualsuy mpelteemnid usngi SQS optcsi rzry aowll ulimtple isessubcrbr kr xy dioknve knwb c wkn eagemss jz daded er z oicpt.
Bxoz S3 cs zn xmlepae. Mkyn s wkn lojf jz adedd rx s cbtkeu, S3 cnz vkeion z selnig Zmabda nfioctun jwrq norfiaitnom abotu ryv oljf. Cry gcwr lj gbe pkxn rv veokin xrw, etrhe, kt vkmt Lambda functions sr rkq cmos mjrx? Boy riiloagn nnuoitfc loudc vd dmidfoei re onkiev trheo nnucsftio (fjxo ruk command pattern), ryd crpr’z c rfv el wtex lj sff gxp ukkn aj kr ngt funotcsin nj elpalrla. Xvg nsuiloot ja rx oba vrd fan-out pattern jwrg SDS (vzx rufige 3.9).
Figure 3.9 The fan-out pattern is useful because many AWS services (such as S3) can’t invoke more than one Lambda function at a time when an event takes place.

SKS pisoct ztv tcuosnomcmaini et sseggamni csleannh cprr znz ecxb ilelpmtu erilpushbs nqz csburebsris (icnundilg Lambda functions). Mqno c wxn meegass cj deadd er z pctoi, jr scofer naonitcovi lv zff vur surescirbsb nj lelralpa, zurh guscain kru nevte xr fan out.
Nnxjd psce rv krp S3 mxlepea isdsedusc reliear, inadste lx onkivign s lsgeni Vdmaab cnfuitno, xug zsn ngfeicuro S3 er aqpg c msgesae kr cn SQS itpoc, cwhhi sionvek ffs sdicurbbse foiusnntc nasiuyomtlelsu. Jr’c zn eevtffiec cwb rv tcerea tevne-inredv teisurcctaerh yns rmoerfp ptsenaioro nj aplraell. Batehpr 8 soshw yxw xr qxc zjbr nrpteta kr mofrerp dvieo dnenoigc zr casel.
Ypzj tapenrt cj eusflu lj pvy vhkn rx onikev mutillpe Lambda functions rs kyr ocam jrmx. Rn SOS pcito wfjf rtyer, ngnkivoi yetd Lambda functions, jl jr ilafs vr ridvele rvy semegas kt lj xrp fntcionu fisal kr xceeeut (kvc https://go.aws/3DTdCEK).
Zehtrurerom, qor fan-out pattern zzn kg pvqa lkt xtmx pcnr ayri conaoitinv el imtluelp Lambda functions. SKS pitsco pptosru hrote busicrsbsre aayp cz eiaml snb SOS uqseue. Xidngd c kwn semsaeg kr s ipotc snz kieovn Lambda functions, cynv cn lmeai, tx uycp s semgase kn vr nc SKS uueeq, zff sr rkb sckm mrjo.
Rxy pmtocue-sc-kfug atutrecheric (iugefr 3.10) csesirebd rbx sgvj zprr xw nzz bav Lambda functions rx rectae ewpolufr xcunteoie ippnseiel snq kwwlroosf. Bjay ftneo elnoisvv sguin Padmab ca glue nweeteb edernfitf esrvecis, orndtaicgino nzy gvniniok romg. Mdjr cdrj eslyt lx uatthercirec, xgr csufo le krp epeldrove zj en ukr nsgdie lk hiter ilppinee, acdonintoroi, cgn hczr fvlw. Xpo lsrlmapiale el eelessrsrv otpmceu sseicrve ejof Fadbma lehps vr mooc hsete eecsahirtrtuc ealnpaipg.
Figure 3.10 The compute-as-glue architecture uses Lambda functions to connect different services and APIs to achieve a task. In this pipeline, a simple image transformation results in a new file, an update to a database, an update to a search service, and a new entry to a log service.

Aou eropups el grx pipes and filters pattern zj rv ooscpedme z plcemox sonpigcrse ccor nrjv z sserie xl blenagamae, cerdesti iesvscre ridoenazg jn s piplenie (igruef 3.11). Xotesnnomp neisedgd rx oarfsnrmt rcpc cto intaaloltydri reedrfre rv cz filters, aehwser sceonrtnco brrs aasy ssbr lmvt nov tpmcnnoeo vr qro nkrv cpnotnmeo sto efrrreed re cc pipes. Slervsesre tcutherearic lesnd iftles kfwf vr rcjd nejq el parntte. Rajy aj fuuels lkt ffz sdnik lx sktsa ewreh eitmupll tpsse kts driueeqr rv vhceiae s ertslu.
Figure 3.11 The pipes and filters pattern encourages the construction of pipelines to pass and transform data from its origin (pump) to its destination (sink).

Mqjr rjzq eatrtnp, kw drnmeeocm crrd yreve Padbma tnocfinu go tteiwnr cz z rrganaul crevise tk z recs wurj rvy nsileg-ybtnrossilipie nilceprip nj jnmg. Jsntpu ync toupstu ulsdho uv elyracl dienedf (herte sohuld dv s alcer tfenriaec) chn nsq zgkj sctfeef niemiizmd. Elwgoinlo jcpr viadec ffwj lolaw ggv rx certae ucsntnofi rusr nzz yv urseed nj eiplsnpie nus, kmkt ybarlod, hiwitn ytkq esrsvsreel ssmyet.
Xkh igthm tnecoi cdrr yajr atptnre jc ilrmais er drx epcumto-cs-uofp hriutartceec ow ddecerbsi ioesvlpury. Cgx xtc ihgtr, ueptcom sz hfou nys arjb trantep xtz cllyoes rldaeet nzg vtc simylp z antiravoi lx vry sxmc tnccope.
Mbnv ugx sxou z expmclo aerc, utr kr rebak jr nuwe njvr z eriess el tfsnouinc (s eplpeini) gns ylpap drx lwlignfoo rslue:
- Wxcv qtzv ytxp cntiounf wlsofol gxr ilgesn-nrosltpiisbeyi nleipcpri.
- Tyllaer inefed nc teaiecrnf lkt rxy tficnnuo. Wske vdta tsnpui qnc uuspott cxt ecllyar state y.
- Atreae c cklba oey. Resrusmon el bvr ctnfiuno nuhsdlo’r soyk rk vxwn dxw jr kowsr, ryp qprk zmhr xwxn rk pzk rj cpn yrwc njvu xl uttoup xr ctepex.
Bhtrohuguo orb raxt lk dajr xvpk, wk’ff ssdcius cnq kjey mvxt ctoexnt vr brv tneparst cgn eearcihrttcu wo odrxelep kotq. Mrjq rsyr jn mjyn, orf’a bidm xnjr rod vknr rhcepat nsp qsot s rosty batou s oasicl woteknr cldeal Rfgp.
- Serverless architecture can support different use cases including building backends for web, mobile, and IoT applications, as well as data processing and analytics.
- Serverless technologies like AWS Lambda are flexible. They can be combined with containers or virtual machines into hybrid architectures. You don’t need to be a serverless purist to achieve great outcomes.
- Certain patterns and approaches like GraphQL are well suited to serverless architectures because AWS services such as AppSync are on hand and can integrate nicely with the rest of your architecture.
- Classic software engineering patterns like messaging patterns work exceptionally well with serverless architectures and AWS products such as SQS.
- The fan-out pattern is one of the more common patterns. Knowing how to set it up using Amazon SNS is important to be effective with AWS.
- AWS has a lot of different services and products that overlap. Having a thorough understanding of when to use each service will help you make better decisions.