SlideShare a Scribd company logo
A Scaffolding for Serverless Apps
Chris Shenton: CTO, V! Studios
AWS Meetup Arlington VA
2018-02-27
Drudgery, Automated
● Test framework
● Documentation
● Code smells
● Multiple stages, environments
● CI/CD
● Deployment to cloud
● Starter app
○ Lambda with Python3
○ File upload to S3
○ Metadata to DynamoDB
○ Soon: Angular2+ front-end
Testing: py.test with test coverage
(.venv3) chris@Haruspex:scaffold-serverless$ make tests
PIP INSTALLING REQUIREMENTS
.venv3/bin/pip install -r requirements.txt
================================================= test session starts
plugins: cov-2.5.1
collected 1 item
tests/test_example.py .
[100%]Coverage.py warning: No data was collected. (no-data-collected)
--------- generated xml file:
/Users/chris/Projects/vstudios/scaffold-serverless/test-results/junit/junit.xml ---------
---------- coverage: platform darwin, python 3.6.3-final-0 -----------
Name Stmts Miss Branch BrPart Cover Missing
------------------------------------------------------------
app/handler.py 55 55 16 0 0% 1-93
Coverage HTML written to dir test-results/coverage
============================================== 1 passed in 2.53 seconds
Documentation: Sphinx generates HTML, ePub
(.venv3) chris@Haruspex:scaffold-serverless$ make docs
cd docs && make SPHINXBUILD=../.venv3/bin/sphinx-build html singlehtml epub
Running Sphinx v1.6.7
reading sources... [ 20%] api
reading sources... [ 40%] cicd
reading sources... [ 60%] index
reading sources... [ 80%] stage-envs
reading sources... [100%] todo
generating indices... genindex
writing additional pages... search
copying images... [100%] cicd-dashboard.png
dumping search index in English (code: en) ... done
build succeeded.
Build finished. The HTML pages are in _build/html.
Build finished. The HTML page is in _build/singlehtml.
Build finished. The ePub file is in _build/epub.
Code Smells: Linting with Flake8
(.venv3) chris@Haruspex:scaffold-serverless$ make flake8
.venv3/bin/flake8 app/
app/handler.py:73:52: E222 multiple spaces after operator
app/handler.py:95:1: W391 blank line at end of file
make: *** [flake8] Error 1
Multiple Stages, Cloud Environments
Repo
Branch
AWS Stage
Environment
Comment
master prod conventional name for production systems
release/* qa quality assurance before release to
production
develop dev default stage name for Serverless
Framework
feature/* $CIRCLE_USERNAME each developer gets their own
environment, named after their GitHub
username
CI/CD: CircleCI every branch -- build and test, then deploy
Deployment: to multiple AWS environments
Starter App: Lambda with Python, API, DynamoDB
API Gateway
/assets
API Gateway
/upload_url
Lambda
s3upload()
Get file metadata from
S3: name, size, etag;
store to DynamoDB
Lambda
get_upload_url()
Return presigned URL
allowing upload
without credentials
Lambda
get_assets()
Return metadata as
JSON or HTML
DynamoDB
Uploads
id, size, etag, bucket
S3 Bucket
Uploads
Save file metadata
Read all metadata
Contact and Code
chris@v-studios.com
@shentonfreude
https://github.com/v-studios/scaffold-serverless

More Related Content

PDF
Criando pipelines de entrega contínua multilinguagem com Docker e Jenkins
PPTX
PPTX
Lando - AddWeb Solution
PDF
Enabling Microservices @Orbitz - DockerCon 2015
PDF
2016 05-cloudsoft-amp-and-brooklyn-new
PDF
Docker + Tenserflow + GOlang - Golang singapore Meetup
PPTX
Cloud Native Okteto Cloud
PDF
Lessons Learned Building a Container App Library
Criando pipelines de entrega contínua multilinguagem com Docker e Jenkins
Lando - AddWeb Solution
Enabling Microservices @Orbitz - DockerCon 2015
2016 05-cloudsoft-amp-and-brooklyn-new
Docker + Tenserflow + GOlang - Golang singapore Meetup
Cloud Native Okteto Cloud
Lessons Learned Building a Container App Library

What's hot (19)

PDF
Docker Essentials Workshop— Innovation Labs July 2020
PDF
CI/CD with Docker on AWS
PDF
KubeCon EU 2016: Getting the Jobs Done With Kubernetes
PDF
Google ko: fast Kubernetes microservice development in Go - Sangam Biradar, E...
PPTX
Docker at Monoco.jp (LinkedIn)
PPTX
Meetup #24 Docker for Node Developer
PPTX
CI/CD Pipeline with Docker
PPTX
Hooking Docker With Selenium
PPTX
Microservices Delivery Platform. Tips & Tricks
PPTX
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
PDF
Intro to Kubernetes Workshop — Innovation Labs July 2020
PDF
Deliver Python Apps with Docker
PDF
TensorFlow, Docker & GoLang - All for Image Rekognition Sangam Biradar(Engine...
PPTX
Where is my scalable API?
PDF
JCConf 2015 workshop 動手玩 Java 專案建置工具
ODP
Kyua and Jenkins: Testing Framework for BSD
PPTX
PPTX
Kubernetes @ Nanit by Chen Fisher
PPTX
Using Multi-stage Docker, Go, Java,& Bazel to DESTROY Long Build Times
Docker Essentials Workshop— Innovation Labs July 2020
CI/CD with Docker on AWS
KubeCon EU 2016: Getting the Jobs Done With Kubernetes
Google ko: fast Kubernetes microservice development in Go - Sangam Biradar, E...
Docker at Monoco.jp (LinkedIn)
Meetup #24 Docker for Node Developer
CI/CD Pipeline with Docker
Hooking Docker With Selenium
Microservices Delivery Platform. Tips & Tricks
Java Day Kharkiv - Next-gen engineering with Docker and Kubernetes
Intro to Kubernetes Workshop — Innovation Labs July 2020
Deliver Python Apps with Docker
TensorFlow, Docker & GoLang - All for Image Rekognition Sangam Biradar(Engine...
Where is my scalable API?
JCConf 2015 workshop 動手玩 Java 專案建置工具
Kyua and Jenkins: Testing Framework for BSD
Kubernetes @ Nanit by Chen Fisher
Using Multi-stage Docker, Go, Java,& Bazel to DESTROY Long Build Times
Ad

Similar to Scaffolding for Serverless: lightning talk for AWS Arlington Meetup (20)

PDF
Genomic Computation at Scale with Serverless, StackStorm and Docker Swarm
PDF
When to use Serverless? When to use Kubernetes?
PDF
Python in the land of serverless
PPTX
Instant developer onboarding with self contained repositories
PPTX
What is Serverless Computing?
PDF
Serverless: A love hate relationship
PDF
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
PDF
Serverless Go at BuzzBird
PDF
The future will be Serverless - JSDay Verona 2018
PDF
Towards Continuous Deployment with Django
PDF
The FaaS and the Furious
PDF
Automated Serverless Pipelines with #GitOps on Codefresh
PDF
Serverless architecture: introduction & first steps
PDF
«Что такое serverless-архитектура и как с ней жить?» Николай Марков, Aligned ...
PDF
Introduction to Serverless through Architectural Patterns
PDF
Building Cloud-agnostic Serverless APIs
PPTX
Getting rid of pain with Heroku @ BrainDev Kyiv
PDF
Powerful Google developer tools for immediate impact! (2023-24 C)
PDF
Devops - Continuous delivery patterns with serverless stack
PDF
The future will be Serverless (FrontConf Munich 2017)
Genomic Computation at Scale with Serverless, StackStorm and Docker Swarm
When to use Serverless? When to use Kubernetes?
Python in the land of serverless
Instant developer onboarding with self contained repositories
What is Serverless Computing?
Serverless: A love hate relationship
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Serverless Go at BuzzBird
The future will be Serverless - JSDay Verona 2018
Towards Continuous Deployment with Django
The FaaS and the Furious
Automated Serverless Pipelines with #GitOps on Codefresh
Serverless architecture: introduction & first steps
«Что такое serverless-архитектура и как с ней жить?» Николай Марков, Aligned ...
Introduction to Serverless through Architectural Patterns
Building Cloud-agnostic Serverless APIs
Getting rid of pain with Heroku @ BrainDev Kyiv
Powerful Google developer tools for immediate impact! (2023-24 C)
Devops - Continuous delivery patterns with serverless stack
The future will be Serverless (FrontConf Munich 2017)
Ad

More from Chris Shenton (11)

PDF
Orchestrating complex workflows with aws step functions
PDF
Automating EVA Workflows with AWS Step Functions
PPTX
Creating Serverless apps for NASA in GovCloud
PDF
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
PDF
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
PDF
Serverless OCR for NASA EVA: AWS Meetup DC 2017-12-12
PDF
Deploying Serverless Cloud Optical Character Recognition in Support of NASA A...
PDF
Second Skin: Real-Time Retheming a Legacy Web Application with Diazo in the C...
PDF
PloneConf2017: serverless python for astronaut safety
PDF
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
PDF
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov
Orchestrating complex workflows with aws step functions
Automating EVA Workflows with AWS Step Functions
Creating Serverless apps for NASA in GovCloud
Squeezing Machine Learning into Serverless for Image Recognition - AWS Meetup...
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
Serverless OCR for NASA EVA: AWS Meetup DC 2017-12-12
Deploying Serverless Cloud Optical Character Recognition in Support of NASA A...
Second Skin: Real-Time Retheming a Legacy Web Application with Diazo in the C...
PloneConf2017: serverless python for astronaut safety
[AWS DC Meetup] Not Your Father’s WebApp: The Cloud-Native Architecture of im...
Not Your Father’s Web App: The Cloud-Native Architecture of images.nasa.gov

Recently uploaded (20)

PPTX
SAP Ariba Sourcing PPT for learning material
PDF
Triggering QUIC, presented by Geoff Huston at IETF 123
PPTX
international classification of diseases ICD-10 review PPT.pptx
PDF
Decoding a Decade: 10 Years of Applied CTI Discipline
PDF
Tenda Login Guide: Access Your Router in 5 Easy Steps
PPTX
522797556-Unit-2-Temperature-measurement-1-1.pptx
PPTX
presentation_pfe-universite-molay-seltan.pptx
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PDF
RPKI Status Update, presented by Makito Lay at IDNOG 10
PPTX
Introduction to Information and Communication Technology
PDF
The Internet -By the Numbers, Sri Lanka Edition
PDF
Paper PDF World Game (s) Great Redesign.pdf
PDF
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
PPTX
Introuction about WHO-FIC in ICD-10.pptx
PPT
tcp ip networks nd ip layering assotred slides
PPTX
innovation process that make everything different.pptx
PDF
Sims 4 Historia para lo sims 4 para jugar
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PDF
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
PPTX
Introduction about ICD -10 and ICD11 on 5.8.25.pptx
SAP Ariba Sourcing PPT for learning material
Triggering QUIC, presented by Geoff Huston at IETF 123
international classification of diseases ICD-10 review PPT.pptx
Decoding a Decade: 10 Years of Applied CTI Discipline
Tenda Login Guide: Access Your Router in 5 Easy Steps
522797556-Unit-2-Temperature-measurement-1-1.pptx
presentation_pfe-universite-molay-seltan.pptx
Slides PDF The World Game (s) Eco Economic Epochs.pdf
RPKI Status Update, presented by Makito Lay at IDNOG 10
Introduction to Information and Communication Technology
The Internet -By the Numbers, Sri Lanka Edition
Paper PDF World Game (s) Great Redesign.pdf
Automated vs Manual WooCommerce to Shopify Migration_ Pros & Cons.pdf
Introuction about WHO-FIC in ICD-10.pptx
tcp ip networks nd ip layering assotred slides
innovation process that make everything different.pptx
Sims 4 Historia para lo sims 4 para jugar
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Best Practices for Testing and Debugging Shopify Third-Party API Integrations...
Introduction about ICD -10 and ICD11 on 5.8.25.pptx

Scaffolding for Serverless: lightning talk for AWS Arlington Meetup

  • 1. A Scaffolding for Serverless Apps Chris Shenton: CTO, V! Studios AWS Meetup Arlington VA 2018-02-27
  • 2. Drudgery, Automated ● Test framework ● Documentation ● Code smells ● Multiple stages, environments ● CI/CD ● Deployment to cloud ● Starter app ○ Lambda with Python3 ○ File upload to S3 ○ Metadata to DynamoDB ○ Soon: Angular2+ front-end
  • 3. Testing: py.test with test coverage (.venv3) chris@Haruspex:scaffold-serverless$ make tests PIP INSTALLING REQUIREMENTS .venv3/bin/pip install -r requirements.txt ================================================= test session starts plugins: cov-2.5.1 collected 1 item tests/test_example.py . [100%]Coverage.py warning: No data was collected. (no-data-collected) --------- generated xml file: /Users/chris/Projects/vstudios/scaffold-serverless/test-results/junit/junit.xml --------- ---------- coverage: platform darwin, python 3.6.3-final-0 ----------- Name Stmts Miss Branch BrPart Cover Missing ------------------------------------------------------------ app/handler.py 55 55 16 0 0% 1-93 Coverage HTML written to dir test-results/coverage ============================================== 1 passed in 2.53 seconds
  • 4. Documentation: Sphinx generates HTML, ePub (.venv3) chris@Haruspex:scaffold-serverless$ make docs cd docs && make SPHINXBUILD=../.venv3/bin/sphinx-build html singlehtml epub Running Sphinx v1.6.7 reading sources... [ 20%] api reading sources... [ 40%] cicd reading sources... [ 60%] index reading sources... [ 80%] stage-envs reading sources... [100%] todo generating indices... genindex writing additional pages... search copying images... [100%] cicd-dashboard.png dumping search index in English (code: en) ... done build succeeded. Build finished. The HTML pages are in _build/html. Build finished. The HTML page is in _build/singlehtml. Build finished. The ePub file is in _build/epub.
  • 5. Code Smells: Linting with Flake8 (.venv3) chris@Haruspex:scaffold-serverless$ make flake8 .venv3/bin/flake8 app/ app/handler.py:73:52: E222 multiple spaces after operator app/handler.py:95:1: W391 blank line at end of file make: *** [flake8] Error 1
  • 6. Multiple Stages, Cloud Environments Repo Branch AWS Stage Environment Comment master prod conventional name for production systems release/* qa quality assurance before release to production develop dev default stage name for Serverless Framework feature/* $CIRCLE_USERNAME each developer gets their own environment, named after their GitHub username
  • 7. CI/CD: CircleCI every branch -- build and test, then deploy
  • 8. Deployment: to multiple AWS environments
  • 9. Starter App: Lambda with Python, API, DynamoDB API Gateway /assets API Gateway /upload_url Lambda s3upload() Get file metadata from S3: name, size, etag; store to DynamoDB Lambda get_upload_url() Return presigned URL allowing upload without credentials Lambda get_assets() Return metadata as JSON or HTML DynamoDB Uploads id, size, etag, bucket S3 Bucket Uploads Save file metadata Read all metadata