Menu
×
   ❮   
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS R TYPESCRIPT ANGULAR GIT POSTGRESQL MONGODB ASP AI GO KOTLIN SASS VUE DSA GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE
     ❯   

AWS Serverless Developer Journey


Journey of a Serverless Developer

Let's assume you're a developer who wants to use Lambda in production.

When first experimenting with Lambda, you'll use the AWS Management Console to develop and deploy.

It makes it easy to develop with Lambda, but it is not suitable for production.

It's like altering files on your production servers.


Local Testing

It is recommended to use IDE or a basic text editor on your local workstation.

Every code change is sent to source and version control.

Developers need to be able to develop, test, and distribute their code locally.

This is where The AWS Serverless Application Model or AWS SAM comes in.


Journey of a Serverless Developer Video

W3schools.com collaborates with Amazon Web Services to deliver digital training content to our students.


AWS SAM

AWS SAM is a serverless application deployment module for AWS CloudFormation.

With AWS SAM, you can design Lambda functions, APIs, serverless applications from the AWS Serverless Application Repository.

AWS CloudFormation is commonly associated with infrastructure as code in AWS.

You may specify your infrastructure in JSON or YAML templates.

This will construct the resources in your AWS environment when you upload these templates to CloudFormation.

There are two key components of AS SAM:

  • SAM Command Line Interface
  • SAM Templates

SAM Templates

To grasp SAM templates, you must first grasp infrastructure as code.

A template is a group of a specification to define your serverless application.

Templates allow you to create serverless solutions quickly and easily.

With templates, you don't need to write custom scripts or perform manual tasks.

Before deploying a template, you should test your configured Lambda functions.

Traditional apps are tested initially locally on the developer's workstation using unit tests.

Ideally, you'd utilize the same local testing method with Lambda functions.

But this requires simulating a Lambda-like execution environment locally.


SAM Command Line Interface

The SAM CLI allows you to test your code locally and simulate the Lambda environment.

It allows for local invocations, sample payload generation, and Lambda function debugging.

This allows you to run unit tests, debug, and resolve issues locally.

After validating the code and templates, you may use the SAM package to build a deployment package.

It is a .zip file that SAM saves in Amazon S3.

You can then use CloudFormation to deploy the .zip file to generate resources using SAM deploy.


Related reads:

AWS SAM and SAM CLI GiHub Reference Guide
AWS SAM Gradual Code Deployment
Working with Deployment Configurations in AWS CodeDeploy

AWS Serverless Exercises

Test Yourself With Exercises

Exercise:

What is AWS SAM?

A  application  module

Start the Exercise


×

Contact Sales

If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail:
[email protected]

Report Error

If you want to report an error, or if you want to make a suggestion, send us an e-mail:
[email protected]

W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our terms of use, cookie and privacy policy.

Copyright 1999-2024 by Refsnes Data. All Rights Reserved. W3Schools is Powered by W3.CSS.