Exploring AWS Serverless Architectures

TL;DR Common patterns and Serverless Architectures on AWS

This article contains several patterns and common architectural choices for building software solutions leveraging mostly AWS serverless services.

Why Serverless

Serverless services help us abstract our computing infrastructure so that we can focus solely on business logic.

Even more, When our app is not running we don’t pay for idle server time, but only for what we use. Serverless services scale horizontally & auto-magically and we don’t have to guess our capacity needs upfront.

We can deploy to production quickly, benefiting from zero infrastructure provisioning & maintenance that these services offer.

These services have built-in fault tolerance and support feature deployments without downtime.

Transition to Serverless

In order to enjoy all these benefits, we should try to transition from traditional monolith to microservices with event-driven architectures. This isn’t always an easy transition and requires some changes in how we approach our applications and infrastructure.

We need to start thinking about how we can start decoupling the different services from our monolith and separate responsibilities and roles between them. In the process of “thinking” Serverless, we have to understand tradeoffs for our design choices and use common patterns for event-Driven Architectures & microservices.

#lambda #serverless #aws

What is GEEK

Buddha Community

Exploring AWS Serverless Architectures

Serverless Vs Microservices Architecture - A Deep Dive

Companies need to be thinking long-term before even starting a software development project. These needs are solved at the level of architecture: business owners want to assure agility, scalability, and performance.

The top contenders for scalable solutions are serverless and microservices. Both architectures prioritize security but approach it in their own ways. Let’s take a look at how businesses can benefit from the adoption of serverless architecture vs microservices, examine their differences, advantages, and use cases.

#serverless #microservices #architecture #software-architecture #serverless-architecture #microservice-architecture #serverless-vs-microservices #hackernoon-top-story

Christa  Stehr

Christa Stehr


How To Unite AWS KMS with Serverless Application Model (SAM)

The Basics

AWS KMS is a Key Management Service that let you create Cryptographic keys that you can use to encrypt and decrypt data and also other keys. You can read more about it here.

Important points about Keys

Please note that the customer master keys(CMK) generated can only be used to encrypt small amount of data like passwords, RSA key. You can use AWS KMS CMKs to generate, encrypt, and decrypt data keys. However, AWS KMS does not store, manage, or track your data keys, or perform cryptographic operations with data keys.

You must use and manage data keys outside of AWS KMS. KMS API uses AWS KMS CMK in the encryption operations and they cannot accept more than 4 KB (4096 bytes) of data. To encrypt application data, use the server-side encryption features of an AWS service, or a client-side encryption library, such as the AWS Encryption SDK or the Amazon S3 encryption client.


We want to create signup and login forms for a website.

Passwords should be encrypted and stored in DynamoDB database.

What do we need?

  1. KMS key to encrypt and decrypt data
  2. DynamoDB table to store password.
  3. Lambda functions & APIs to process Login and Sign up forms.
  4. Sign up/ Login forms in HTML.

Lets Implement it as Serverless Application Model (SAM)!

Lets first create the Key that we will use to encrypt and decrypt password.

    Type: AWS::KMS::Key
      Description: CMK for encrypting and decrypting
        Version: '2012-10-17'
        Id: key-default-1
        - Sid: Enable IAM User Permissions
          Effect: Allow
            AWS: !Sub arn:aws:iam::${AWS::AccountId}:root
          Action: kms:*
          Resource: '*'
        - Sid: Allow administration of the key
          Effect: Allow
            AWS: !Sub arn:aws:iam::${AWS::AccountId}:user/${KeyAdmin}
          - kms:Create*
          - kms:Describe*
          - kms:Enable*
          - kms:List*
          - kms:Put*
          - kms:Update*
          - kms:Revoke*
          - kms:Disable*
          - kms:Get*
          - kms:Delete*
          - kms:ScheduleKeyDeletion
          - kms:CancelKeyDeletion
          Resource: '*'
        - Sid: Allow use of the key
          Effect: Allow
            AWS: !Sub arn:aws:iam::${AWS::AccountId}:user/${KeyUser}
          - kms:DescribeKey
          - kms:Encrypt
          - kms:Decrypt
          - kms:ReEncrypt*
          - kms:GenerateDataKey
          - kms:GenerateDataKeyWithoutPlaintext
          Resource: '*'

The important thing in above snippet is the KeyPolicy. KMS requires a Key Administrator and Key User. As a best practice your Key Administrator and Key User should be 2 separate user in your Organisation. We are allowing all permissions to the root users.

So if your key Administrator leaves the organisation, the root user will be able to delete this key. As you can see **KeyAdmin **can manage the key but not use it and KeyUser can only use the key. ${KeyAdmin} and **${KeyUser} **are parameters in the SAM template.

You would be asked to provide values for these parameters during SAM Deploy.

#aws #serverless #aws-sam #aws-key-management-service #aws-certification #aws-api-gateway #tutorial-for-beginners #aws-blogs

Serverless Ninja Part 01: Serverless = Efficiency

This article aims to explain how organizations and individuals can benefit from the efficiency that serverless architectures offer. This article shares the top 4 cost centers that serverless-based systems help in optimizing.

Elimination of Server Management Cost

Image for post

Serverless architectures do not require developers neither organizations to manage underlying infrastructure. On the other hand, AWS handles the server management activities on our behalf so that we can focus on writing our application’s features and capabilities.

Since serverless-based systems do not require organizations to manage servers. Organizations achieve cost-efficiency in spending money involved in the following activities:

  • Managing Cluster Scalability
  • Implementing Risk Mitigation
  • Implementing Disaster Recovery Strategy
  • Patching Security Vulnerabilities
  • Installing Operating System Updates
  • Hiring Server Management Staff

#aws #serverless-architecture #serverless #aws-lambda #software-architecture

Rory  West

Rory West


Top 14 Must-Haves for Your AWS Architecture Checklist

After analyzing the requirements of your application, you came up with an AWS architecture. Good job! This blog post contains a checklist helping you to validate your architecture. Make sure that you haven’t forgotten any important aspects.

I’ve created an AWS diagram using Cloudcraft and will use the following architecture as an example when going through my AWS Architecture Checklist. The architecture shows a typical web application consisting of a layer for synchronous request processing and a layer for asynchronous job processing. My architecture is made up of the following components:

  • Route 53 a globally distributed Domain Name System (DNS)
  • CloudFront a Content Delivery Network (CDN)
  • Simple Storage Service (S3) an object store
  • Application Load Balancer (ALB) distributing incoming HTTPS requests among a fleet of EC2 Instances
  • EC2 Instance a virtual machine
  • Auto Scaling Group manages a fleet of EC2 instances
  • Simple Queue Service (SQS) a message queue
  • Relational Database Service (RDS) Aurora a PostgreSQL-compatible database
  • Elastic File System (EFS) a network file system (NFS)

#aws #aws-diagrams #aws-cloud #aws-architecture #aws-services

Ellie Windler

Ellie Windler


Why Serverless Architecture Is The Future Of Software Architecture?

Any business when thinking of scaling business applications in a cost-effective way goes for a cloud computing approach. Even leading technology companies like Quora, Facebook, LinkedIn, Pinterest, and Spotify are also getting benefits offered by cloud computing infrastructures.

In this article, we are going to deeply understand the concept of serverless and how it works and why it is useful for your business.

#Serverless Architecture #What is Serverless Architecture #Serverless