Skip to content

lesarmiento37/serverless-ds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Serverless Framework Presentation

Overview

This document provides the structure and key points for a 45-minute presentation on the Serverless Framework, specifically within AWS. The session includes an introduction to serverless technology, a hands-on demonstration of a serverless architecture, and deployment via AWS CodeBuild using a buildspec.yaml file. The live demo will feature a Step Function triggered by S3 bucket events, involving Lambda functions that write to and read from a DynamoDB table.


Agenda and Timing

1. Introduction to Serverless Technology (5 minutes)

  • Definition of Serverless:
    • Explanation of the serverless model, where cloud providers manage the infrastructure, allowing developers to focus on code.
  • Benefits of Serverless:
    • Automatic Scaling: Adapts to load without manual intervention.
    • Pay-As-You-Go Billing: Charges are based on invocations and runtime, reducing idle costs.
    • Reduced Operational Complexity: Developers manage only the code, not the infrastructure.
  • Common Use Cases:
    • Event Processing: Real-time data streams, IoT, etc.
    • Microservices: Functions can be structured as independent services.
    • Stateless Backends: APIs and other backend functions.
    • Real-Time Data Processing: Efficient processing and transformation of data in real-time.

2. Serverless on AWS (5 minutes)

  • Key AWS Serverless Services:
    • AWS Lambda: Serverless compute for running code in response to events, triggers, or requests.
    • AWS Step Functions: Managed service to orchestrate workflows and microservices.
    • Amazon S3: Object storage service with event triggers for starting workflows.
    • Amazon DynamoDB: NoSQL database managed by AWS, ideal for serverless applications.
  • Benefits of Using Serverless on AWS:
    • Seamless Integration: Native interoperability among AWS services.
    • Complete Ecosystem: Broad support for diverse serverless needs within a single platform.

3. Introduction to the Serverless Framework (5 minutes)

  • What is the Serverless Framework?
    • An open-source tool designed to simplify the development, deployment, and management of serverless applications.
    • Multi-platform support, with this presentation focused on AWS.
  • Key Capabilities:
    • Simplified Deployment: Easily deploys Lambda functions and related serverless resources.
    • Infrastructure as Code (IaC): Serverless applications and infrastructure are defined in code for consistency and versioning.
  • Serverless Framework Structure:
    • Folder and file layout.
    • Basic overview of serverless.yml configuration, including functions, resources, and environment settings.

4. Serverless Framework Plugins (5 minutes)

  • Purpose of Plugins:
    • Extend framework functionality to support various services and use cases.
  • Examples of Useful Plugins:
    • VPC Plugin: Allows deployment of Lambda functions within VPC subnets for secure networking.
    • DynamoDB Plugin: Facilitates automated setup and configuration of DynamoDB tables.
    • Additional Plugins: Plugins for testing, debugging, and CI/CD integration, expanding framework capabilities.

5. Deploying Within a VPC Using Serverless Framework (5 minutes)

  • Motivation for Deploying in a VPC:
    • Enhanced Security: Isolation of resources from the public internet.
    • Direct Connectivity: Direct access to databases and other internal AWS resources within the VPC.
  • Configuring a VPC in Serverless Framework:
    • Example of configuring subnets and security groups in serverless.yml:
      provider:
        name: aws
        runtime: python3.8
        vpc:
          securityGroupIds:
            - sg-123456
          subnetIds:
            - subnet-abcde
            - subnet-fghij
    • Considerations:
      • Increased latency for Lambda cold starts within VPCs.
      • Adjusting permissions and networking for Lambda functions within private subnets.

6. Deployment Automation with AWS CodeBuild (5 minutes)

  • Setting Up AWS CodeBuild:
    • Using buildspec.yaml: Define the build and deployment steps in CodeBuild.
    • Serverless Framework Integration: Run serverless deploy as part of the CodeBuild pipeline.
  • Basic buildspec.yaml Example:
    version: 0.2
    phases:
      install:
        commands:
          - npm install -g serverless
      build:
        commands:
          - serverless deploy

7. Proposed Architecture

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages