Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Let's Build Serverless Apps. Wait, why?

Let's Build Serverless Apps. Wait, why?

Serverless is an operating model, where we delegate various activities that do not provide value to our business to other parties. By delegating these things, we can focus on improving business logic and not worrying about infrastructure.

At the end, serverless enables us to have less code, less liability, better integration, better application, more focus, more values to deliver. These are the real values for developers.

This talk will describe few reasons why adopting AWS serverless services might be a good approach for you.

Donnie Prakoso

June 17, 2022
Tweet

More Decks by Donnie Prakoso

Other Decks in Technology

Transcript

  1. Community
    AWS Community
    Let’s Build Serverless Apps. Wait, why?
    donnieprakoso
    @donnieprakoso go.donnie.id/youtube
    donnieprakoso
    Donnie Prakoso
    Developer Advocate, ASEAN
    AWS

    View full-size slide

  2. AWS Community
    Key Takeaways
    Understand the key reasons of adopting serverless
    services to run your architecture and essential
    serverless services you need to use.

    View full-size slide

  3. What is serverless?

    View full-size slide

  4. AWS Community
    What is serverless?
    Automatic scaling
    Highly available and secure
    Pay for use
    No infrastructure provisioning,
    no management

    View full-size slide

  5. AWS Community
    There’s a paradigm shift happening
    5
    Level of abstraction
    Focus on business logic
    Serverless
    Physical machines
    Virtual machines
    Containerization AWS
    Lambda
    AWS
    Fargate
    • Continuous scaling
    • Fault tolerance built-in
    • Pay for value
    • Zero maintenance
    • Focus on business value

    View full-size slide

  6. AWS Community 6
    What does the future look like?
    ALL THE CODE YOU EVER WRITE IS BUSINESS LOGIC

    View full-size slide

  7. Reason #1:
    No Server Management

    View full-size slide

  8. AWS Community
    AWS operational responsibility models
    Compute
    Virtual
    machine Amazon EC2 AWS Elastic Beanstalk Lambda
    Fargate
    Databases MySQL MySQL on
    Amazon EC2
    Amazon RDS for MySQL Amazon RDS Amazon Aurora DynamoDB
    Storage Storage
    S3
    Messaging ESBs
    Amazon MQ Amazon Kinesis EventBridge/SQS/SNS
    Analytics
    Hadoop Hadoop on EC2 EMR Amazon OpenSearch Service Amazon Athena
    Less
    More

    View full-size slide

  9. AWS Community 9
    AWS Lambda — Event-driven function
    Event Source Function Services / Other
    Changes in
    data state
    Requests to
    endpoints
    Changes in
    resource state
    Node.js
    Python
    Java
    C#
    Go
    Ruby
    Bring Your Own

    View full-size slide

  10. AWS Community
    Anatomy of a Lambda Function
    10
    Handler function
    • Function executed on invocation
    • Processes incoming event
    Event
    • Invocation data sent to function
    • Shape differs by event source
    Context
    • Additional information from Lambda service
    • Examples: request ID, time remaining
    app.py

    View full-size slide

  11. Reason #2:
    Get to Market, Fast and Secure

    View full-size slide

  12. AWS Community
    AWS
    Lambda
    AWS
    Fargate
    Amazon
    API Gateway
    Amazon
    SNS
    Amazon
    SQS
    COMPUTE
    DATA STORES
    INTEGRATION
    Amazon Aurora
    Serverless
    Amazon
    S3
    Amazon
    DynamoDB
    Amazon
    EventBridge
    STREAMING
    Amazon Managed
    Streaming for Apache
    Kafka (MSK)
    Amazon
    Kinesis
    Amazon
    MQ

    View full-size slide

  13. AWS Community
    IAM Role for AWS Lambda

    View full-size slide

  14. Reason #3:
    Effective Scaling and Cost Efficient

    View full-size slide

  15. AWS Community
    Auto Scaling for Amazon DynamoDB

    View full-size slide

  16. AWS Community
    AWS Lambda: Fine-grained pricing
    • Pay for value
    • Priced by power rating
    • Charged in 1ms increments
    • Low per-request charge
    • No minimum
    • Never pay for idle
    Free Tier
    1M requests and 400,000 GBs of compute.
    Every month, every customer.

    View full-size slide

  17. Reason 4:
    Flexible and Seamless integrations

    View full-size slide

  18. AWS Community
    Small pieces, loosely joined

    View full-size slide

  19. AWS Community
    Trigger Configuration — AWS Lambda

    View full-size slide

  20. Reason 5:
    Faster Response with Events

    View full-size slide

  21. AWS Community
    Change Data Capture for DynamoDB Streams

    View full-size slide

  22. AWS Community
    Event-driven architectures drive reliability and
    scalability
    Asynchronous Events
    Improve responsiveness and
    reduce dependencies
    Event Routers
    Abstract producers and consumers
    from each other
    Event Stores
    Buffer messages until services
    are available to process

    View full-size slide

  23. AWS Community
    Event Targets
    AWS Lambda
    Amazon Kinesis Data
    Firehose
    Amazon SNS
    Additional Targets
    Amazon EventBridge
    SaaS Event Sources
    Event Routers
    Custom Event Bus
    SaaS Event Bus
    Default Event Bus
    AWS Service Event Sources Topics

    View full-size slide

  24. AWS Community
    Event-driven Architecture in Serverless Microservices

    View full-size slide

  25. Wrapping up!

    View full-size slide

  26. AWS Community
    Why serverless?
    • What is serverless? Serverless as operating model
    • Focus on products, not infrastructure
    • Reason #1: No server management
    • Reason #2: Get to market, fast and secure
    • Reason #3: Effective scaling and cost efficient
    • Reason #4: Flexible and seamless integrations
    • Reason #5: Faster response with Event-Driven
    • Serverless fits various use cases, i.e. IT Automation, Microservices, Data
    processing, Serverless frontend/backend, Architectural patterns

    View full-size slide

  27. Community
    Download the PPT
    Code Repo + Demo
    AWS Community
    https://bit.ly/aws-community-asean-content
    Thank you
    donnieprakoso
    @donnieprakoso go.donnie.id/youtube
    donnieprakoso
    Donnie Prakoso
    Developer Advocate, ASEAN
    AWS

    View full-size slide