Serverless Framework
The serverless framework is used to develop and deploy applications on Lambda functions using the AWS CloudFormation stack. This is a very popular framework that supports multiple programming languages and is associated with the AWS CloudFormation stack.
Now let’s understand how serverless frameworks handle the AWS CloudFormation stack to provide well-packed applications. The following key AWS serverless support services will use the serverless framework to provide serverless applications.
=> AWS Lambda: AWS Lambda is used to perform business logic of the application, which is handling HTTP events to trigger business requests and perform. You can read more about AWS Lambda using the below story.
=> API Gateway: API gateway services allow serverless to expose HTTP endpoints that are associated with Lambda business logics. So we can configure multiple API endpoints to a certain Lambda function, and each endpoint will be configured with API Gateway.
=> DynamoDB: DynamoDB is a NoSQL database service that is provided by AWS. So we can use this database service to run serverless applications.
=> AWS S3: AWS S3 is used to maintain the storage of the application. The following story will help you to understand the concepts behind the AWS S3 service.
=> Identity and Access Management: This AWS service is used to manage the permissions between AWS resources. So the serverless framework will handle the user permissions using this service to interact between resources.
=> Simple Notification Service: This is a notification service provided by AWS to ensure that app messages, push notifications, and other types of notifications are integrated with our applications. So Serverless uses this service to manage the notifications service.
=> Simple Queue Service: This is a queue service provided by AWS. When messages hit the queue, this service will trigger the AWS Lambda function to execute the business logic. Serverless configures the queue upon configurations of our serverless application.
=> CloudWatch: CloudWatch is used to monitor logs from the AWS service, especially in Lambda logs, which can be monitored using this service. Serverless will configure this service by default.
=> Step Functions: This is an AWS service that allows us to develop complex applications using a workflow model such as a state machine. Serverless will support configuring step functions.
=> AWS Cognito: This is the user management service that is used for authentication and authorization mechanisms. Serverless offers configuration options for user pools and other features in this service.
=> Secrets Manager: This service is used to manage credentials such as API keys related to serverless applications. This is very useful for the security of the application.
=> Key Management Service: This service is used to manage encryption and key management for secure serverless applications. Mainly this service stores keys like JWT secret keys and etc. This is very useful for the security of the application.
=> CloudFront: This is a CDN service provided by AWS. This service is often used with APIs and static content.
=> CloudFormation: This service uses all other mentioned resources to provide an integrated application. This is the entry point used by the serverless framework for deploying applications.
But we do not need to use all these services when we deploy serverless applications on AWS. AWS Lambda, API Gateway, Identity and Access Management, CloudWatch, AWS S3, and the CloudFormation stack will be used initially when we deploy serverless applications. If we need other services, we can enable them from serverless configurations. Other than these key AWS services, Elasticsearch, AppSync, Elastic Beanstalk, EventBridge, CodePipeline, CodeBuild, CodeDeploy, S3 Glacier, Elastic File System, Managed Message Queues, Redshift, Relational Database Service, Elastic Container Service, and Elastic Kubernetes Service can be used for the serverless applications upon the complex requirements of the application.
Now we have some basic ideas about serverless frameworks and how they behave. Let’s discuss how to develop the serverless application and deploy it into AWS in the next story.