Slide 1

Slide 1 text

Frankfurt | 26 & 27 September 2018

Slide 2

Slide 2 text

Serverless made our developer life a whole lot easier

Slide 3

Slide 3 text

Less infrastructure to worry about Less scalability issues, quicker TTL Happier customers

Slide 4

Slide 4 text

Though it has incredibly improved,
 building your own serverless applications, from ground up, is still not that easy.

Slide 5

Slide 5 text

And the way we use some of the serverless services can be incredibly repetitive

Slide 6

Slide 6 text

CRM

Slide 7

Slide 7 text

CRM grew more

Slide 8

Slide 8 text

And More! + a lot more as you grow!

Slide 9

Slide 9 text

What do we do when this is the number of tables we have?

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

A serverless variation of the “Groundhog day” - same functionality and logic, different parameter names / objects - identical serverless component compositions - similar delivery expectations

Slide 12

Slide 12 text

As your serverless application grows Many identical functionalities Common patterns emerge

Slide 13

Slide 13 text

Patterns

Slide 14

Slide 14 text

AWS Serverless Application Repository A warehouse for serverless applications and components developed using AWS SAM. (GA early 2018) - Community built and shared component - Instantly deployable - Searchable - Customizable input parameters - Predefined licensing

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

What is, actually, the Serverless Application Repository? a library of Plug and Play components? Is it a list of Chef’s recipes or

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

Currently on Serverless App Repository: - Complete tools - Applications - Complete microservices - Partial services - Examples

Slide 21

Slide 21 text

So how do you use it?

Slide 22

Slide 22 text

Assembling production-ready applications using Serverless App Repository Aleksandar Simovic | 27.09.2018.

Slide 23

Slide 23 text

Aleksandar Simovic Senior Software Engineer at ScienceExchange co-author of “Serverless Applications with Node.js” AWS Serverless Hero co-organizer of JS Belgrade (>1800 members)

Slide 24

Slide 24 text

What we’ll cover, is a lot of questions, on - Designing applications with App Repo - Combining serverless components - Problems and caveats - Building one Serverless App Repo component by yourself

Slide 25

Slide 25 text

(with AppRepo) Designing serverless applications

Slide 26

Slide 26 text

(could be a talk by itself)

Slide 27

Slide 27 text

Imagine the Node.js world without NPM…
 
 Well, thats where we would live right now, in serverless, 
 if it weren’t for Serverless App Repository.

Slide 28

Slide 28 text

The Design Context - Components consist of AWS resources also, not only code. - Orchestration and deployment - Versioning - Stages - Trust Serverless AppRepo != NPM, Github

Slide 29

Slide 29 text

Design obstacles - Do we fit it within our architecture? - Do we orientate ourselves around the given components?
 - Does its resource composition or folder structure suit us? - What does it mean to deploy the component along with its stack?
 - If so? How do we orchestrate?

Slide 30

Slide 30 text

Design obstacles - Align with your own architecture. - Parametrized NPM approach.
 - Component structure is only important in the context of resources used.
 - At the moment, components are deployed as a separate stack. Will change in the future. (though you can improvise and you should)

Slide 31

Slide 31 text

Design Process - How do we design such systems considering App Repo?
 - How do you plan and develop?
 - How do you estimate them?

Slide 32

Slide 32 text

Design Process 1. Requirements 2. Process Decomposition (SSD, BPMN can help) 3. Translation to AWS Terms (requires AWS Aware*) 4. Assess and use adequate components 5. Develop

Slide 33

Slide 33 text

Process Decomposition 1. Requirement 2. User Story 3. Complex Business Process 4. Simple Business Process 5. AWS AppRepo Component / Custom built component

Slide 34

Slide 34 text

Does one serverless component equal to one simple process? • Mechanical engineering has solved these problems awhile ago. • Components are not constrained by a single purpose. • A component can be both simple and complex. (bolts and water pumps)

Slide 35

Slide 35 text

Architecture design depends greatly on best practices

Slide 36

Slide 36 text

Also known as “some of our previous relationships” Combining serverless components “Two pieces of puzzle that don’t fit together”

Slide 37

Slide 37 text

How do we connect our components? - data formats - resources - avoid duplicating components - use conditional component resources We don’t need to care about resource protocols, but we do need to care about:

Slide 38

Slide 38 text

Scenarios - All services custom built (HERE) - Custom built + single independent serverless component - Custom built + multiple independent serverless components - Custom built + multiple connected serverless components - Building everything from serverless components (Is it possible?)

Slide 39

Slide 39 text

Your combined AppRepo component is deleted. - How are we handling such risk? - Are our services going to collapse? - What happens to our data? - How do you backup?

Slide 40

Slide 40 text

Your combined AppRepo component is deleted. - Deployed stacks are not deletable. 
 - Unpublishing a component, has no effect on your currently deployed apps.
 - If you delete this stack - there are AWS mechanisms to prevent deletion. (S3)
 - Your data is safe.

Slide 41

Slide 41 text

Problems and caveats

Slide 42

Slide 42 text

Performance - What is the performance of a serverless component? - We have no data for different scenarios for a single, average or mass use? - How does it scale? - Does it have limitations and are those handled? (e.g. Kinesis Firehose 2MB/shard)

Slide 43

Slide 43 text

Bills - Resource Consumption - How do we know the cost of a serverless component? - When we scale, how does our cost scale?
 


Slide 44

Slide 44 text

Testing - How do we check if it was properly tested from the beginning? - How do we approach testing other people’s serverless components? - Code? - Infrastructure? - How do we combine testing? - Tools - Frameworks? - Coverage - Different approaches? - CI, CD?

Slide 45

Slide 45 text

Errors - How do we handle errors from such components? - Tracking errors - What if this component produces errors?

Slide 46

Slide 46 text

Metrics and Monitoring - How do we measure if a certain component is behaving as intended? - What are the metrics of a single component? - Tracking its usage?

Slide 47

Slide 47 text

Security - What are the component’s permissions and policies? - Can you deny some? - How do we know if it has a security flaw? - Leaking information?

Slide 48

Slide 48 text

Standardization - Shared issues with NPM and GitHub - There is no certification process, at the moment. (should there be one?) - Trust factor. - AWS ownership brings expected service standardization. (Community)

Slide 49

Slide 49 text

How do we approach and tackle these problems in production - The design process, decompose all business processes - Track components that suit a process - Analyze each potential component candidate, its resources, composition - Analyze the code and tests, run them - Use a test account, with Billing Alerts - Deploy at the application development account

Slide 50

Slide 50 text

Building a Serverless App Repo component by yourself

Slide 51

Slide 51 text

A component’s components - AWS SAM Template (with SAM local) - Any language - Restricted policy list - AWS Resources supported by the policy list - License - Source Code URL

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

Key Takeaways - You don’t need to manually write each and every service, over and over again.
 - App Repo components save an immense amount of time.
 - When designing with AppRepo, decompose everything to a simple process.
 - Though very young, AppRepo is safe and actively in development and you can greatly benefit from it in production. - Analyze each and every component carefully, scalability, its limitations and cost.

Slide 55

Slide 55 text

Thank you!

Slide 56

Slide 56 text

Just for AWS Community Days
 our book discount code:
 
 claudia40
 
 More at:
 effortless-serverless.com 
 
 Twitter:
 @simalexan Q&A