lets you run code without provisioning or managing servers. • executes your code only when needed. • scales automatically, a few requests per day to thousands per second. • Node.js, Java, C# and Python "84-BNCEBαʔόʔΛϓϩϏδϣχϯάͨ͠Γཧ͠ͳͯ͘ίʔυΛ࣮ߦͰ͖ΔίϯϐϡʔςΟϯάαʔϏεͰ͢ɻඞཁͳ ͱ͖ʹίʔυΛ࣮ߦ͠ɺࣗಈతʹεέʔϧ͠·͢ɻ
managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. • Low-Cost and Efficient. (only for calls made to your APIs and data transfer out) • Performance at Any Scale • Run Your APIs Without Servers ϑϧϚωʔδυαʔϏεͰɺ։ൃऀͲͷΑ͏ͳεέʔϧͰ͋ͬͯɺ؆୯ʹ"1*ͷ࡞ɺɺอकɺࢹɺอޢ͕ߦ͑·͢ɻ
and process large streams of data records in real time. • rapid and continuous data intake and aggregation. • Accelerated log and data feed intake and processing. • Real-time metrics and reporting. • Real-time data analytics. • Complex stream processing. "NB[PO,JOFTJT4USFBNTΛ༻ͯ͠ɺσʔλϨίʔυͷେྔͷετϦʔϜΛϦΞϧλΠϜͰऩू͠ɺॲཧ͠·͢ɻߴ͔ͭܧଓత ʹσʔλͷऔΓࠐΈͱूΛߦ͏͜ͱ͕Ͱ͖·͢ɻ
Amazon Kinesis AWS Lambda AWS Lambda Amazon Elasticsearch Service Context + Token Principal + Policy Policy is cached Denied 403 Allowed Auth function Consumers function System diagrams
wants to be a simple function. • 1 Lambda per method request. GET:/hello => getHello POST:/hello => postHello • develop and deploy efficiently େنͳγεςϜɺػೳཁ͕݅ଟ͍ɻ"84-BNCEBγϯϓϧͳ'VODUJPOΛอ͍ͪͨɻϝιουϦΫΤετʹ͖ͭ-BNCEBΛ ͭɻ·ͨޮྑ͘։ൃͱσϓϩΠΛ͍ͨ͠ɻ
Lambda Function request * @param input The Lambda Function input * @param context The Lambda execution environment context object. * @return The Lambda Function output */ public O handleRequest(I input, Context context); } *0ΛҙͷܕͰ࣮Ͱ͖·͕͢ɺ+BWB#FBOͳΫϥε͘͠ɺϓϦϛςΟϒͳܕͷΈʹͳ͓ͬͯΓɺ+BWBͷ੍Λड͚ͨΓ͢Δͷ Ͱɺ͋·ΓΦεεϝ͠·ͤΜɻ
Amazon Kinesis AWS Lambda AWS Lambda Amazon Elasticsearch Service Context + Token Principal + Policy Policy is cached Denied 403 Allowed Auth function Consumers function System diagrams
I will `assembly` one by one and upload it. • It is troublesome to configure the API Gateway on the console. -BNCEBͰ࣮ߦ͢Δ·Ͱ͕େมɻBTTFNCMZͯ͠Ξοϓϩʔυͯ͠Λ܁Γฦ͞ͳ͍ͱ͏·͘ಈ͔͔͘Βͳ͍ɻίϯιʔϧ্Ͱ"1* (BUFXBZͷઃఆΛߦ͏ͷ໘ɻ
Amazon Kinesis AWS Lambda AWS Lambda Amazon Elasticsearch Service Context + Token Principal + Policy Policy is cached Denied 403 Allowed Auth function Consumers function System diagrams Make this part
lazy val infraDynamo = (project in file("./modules/infrastructure/dynamodb")). dependsOn(domain). lazy val infraKinesis = (project in file("./modules/infrastructure/kinesis")). dependsOn(domain). lazy val appHello = (project in file("./modules/application/hello")). dependsOn(infraLambda, infraDynamo, infraKinesis). ϚϧνϓϩδΣΫτͷґଘؔΛґଘϞσϧͷ௨Γʹઃఆɻ
module of Lambda. • Make the Infrastructure as finely as possible. • Reduce module size. ϓϩδΣΫτߏɻιʔεNPEVMFTσΟϨΫτϦͷԼʹஔ͘ɻBQQMJDBUJPO͕-BNCEBͷϞδϡʔϧʹͳΔɻ*OGSBTUSVDUVSFݶ Γͳ͘খ͘͞࡞Δɻ-BNCEBͷϞδϡʔϧαΠζΛখ͘͢͞ΔͨΊɻ
new AccountRepository with AccountRepositoryOnDynamoDB override val accountEventPublisher = new AccountEventPublisher with AccountEventPublisherOnKinesis }
Amazon Kinesis AWS Lambda AWS Lambda Amazon Elasticsearch Service Context + Token Principal + Policy Policy is cached Denied 403 Allowed Auth function Consumers function System diagrams Make this part
lazy val infraDomain = (project in file("./modules/infrastructure/domain")). dependsOn(domain). lazy val appAccountModified = (project in file(“./modules/application/accountmodified”)). dependsOn(infraLambdaConsumer, infraDomain). ґଘؔɺ"1*(BUFXBZͱ΄΅ಉ͡ɻ
• Easy to share processing with multiple projects. • Cheap, scalable and easy to operate. 4DBMB%%%ͱ4FSWFSMFTTΛΈ߹ΘͤΔͱΓ͍͢ɻϚϧνϓϩδΣΫτͰॲཧΛڞ௨Խ͍͢͠ɻ҆ͯ͘εέʔϥϒϧͰӡ༻ ָ͕ɻ