Slide 1

Slide 1 text

Learn to Program The Cloud with Ruby & AWS Lambda

Slide 2

Slide 2 text

Ken Collins @MetaSkills Principal Engineer @CustomInkTech

Slide 3

Slide 3 text

Programming The Cloud ⛅

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Getting Started AWS, SAM, & Lambda https://aws.amazon.com/serverless/sam/

Slide 6

Slide 6 text

https://dev.to/aws-heroes/aws-lambda-microservice- workshop-using-s3-libvips-ruby-4o96 Start Small. Ruby S3/Image Microservice.

Slide 7

Slide 7 text

https://lamby.custominktech.com/docs/quick_start And Grow. Rails & JavaScript Starter Application. Deploy in 5 min.

Slide 8

Slide 8 text

https://lamby.custominktech.com/docs/quick_start And Grow. Rails & JavaScript Starter Application.

Slide 9

Slide 9 text

https://lamby.custominktech.com/docs/quick_start And Grow. Rails & JavaScript Starter Application.

Slide 10

Slide 10 text

Unconscious Bias? or Knowledge Gaps? (open discussion)

Slide 11

Slide 11 text

Rails & Lambda (from the inside out)

Slide 12

Slide 12 text

How Does Lamby Work?

Slide 13

Slide 13 text

How Does Lamby Work? Hash Convert

Slide 14

Slide 14 text

How Does Lamby Work? app.rb Everything else is just basically Rails

Slide 15

Slide 15 text

How Does Lamby Work? 3 Seconds (cold start) Milliseconds

Slide 16

Slide 16 text

• Think of app.rb as config.ru for API Gateway. • Rails is in good company! Express, Flask, etc all do the same thing. • Think of Lambda as a cheaper PAYGO on Heroku. Rails & Lambda (inside out)

Slide 17

Slide 17 text

Scaling compute is not your problem anymore.

Slide 18

Slide 18 text

The Serverless Application Model https://aws.amazon.com/serverless/sam/

Slide 19

Slide 19 text

Core SAM CLI Commands. More on the ./bin directory later.

Slide 20

Slide 20 text

Infrastructure as Code (IaC) . I hope you like YAML!

Slide 21

Slide 21 text

SAM is Syntactic Sugar for CloudFormation. Meta & DRY!

Slide 22

Slide 22 text

AWS::Serverless::Function

Slide 23

Slide 23 text

• AWS Resource Specification Language. • CLI Interface to Develop & Deploy Apps. • Lamby Uses Cutters Templates. • Super fast Squirrel on GitHub. Keep Up! • Bookmark These Resources… Serverless Application Model

Slide 24

Slide 24 text

AWS Serverless Application Model (AWS SAM) Specification https://github.com/awslabs/serverless-application-model https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification.html Intrinsic Function Reference https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference.html AWS Resource and Property Types Reference https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html AWS SAM CLI GitHub Release Notes https://github.com/awslabs/aws-sam-cli/releases

Slide 25

Slide 25 text

Docker Conventions

Slide 26

Slide 26 text

https://github.blog/2015-06-30-scripts-to-rule-them-all/ Normalized Script Convention

Slide 27

Slide 27 text

Docker & Docker Compose Bin Scripts.

Slide 28

Slide 28 text

Docker Compose. Avoids Repeated ENV & Volume Configs

Slide 29

Slide 29 text

Docker. Rails, SAM, JavaScript, Etc on Lambda Dev.

Slide 30

Slide 30 text

Script Conventions. Underscore for Container bin/_server bin/server

Slide 31

Slide 31 text

• Node & Webpacker • Compiled & Served Assets • Dotenv Integration • Encrypted Credentials with SSM Parameter Store Dig In & Explore https://github.com/customink/lamby-cookiecutter • CloudWatch Logging & Lograge • API Gateway HTTP API v2 Default • Custom Domain Names, SSL, & CloudFront • https://lamby.custominktech.com

Slide 32

Slide 32 text

• Native MySQL & PostgreSQL using AWS RDS Proxy. Migrations? • Best Practices for Background Tasks & Event-Driven architecture using EventBridge, Asynchronous Invocations, and SNS/SQS. ActiveJob? Coming Soon…

Slide 33

Slide 33 text

No content