Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cristian Carballo
Cristian Carballo

Posted on

     

AWS Local Serverless Environment Setup using AWS SAM

SAM

This post is intended to list the steps for setting up your local development environment for creating serverless applications using the AWS SAM CLI.

I will list below all the pre-requisites that you need to have installed in your local machine:

  • A valid AWS Account —To build and deploy our serverless function to the AWS Lambda, so you must have a valid AWS account. If you are new and do not have an account yet, you can navigate tohttp://console.aws.amazon.com/ and signup for a new account

  • Python — My example is developed in Python so i will recommend you to install Python if you want to use my code. You can download the latest version of python by visitinghttps://www.python.org/downloads/ and install the same based on the operating system you are using. It is important to mention that you can build your serverless functions with any language of your choice. There are quite a few languages supported by AWS Lambda, like Python, C#, Ruby, NodeJS, etc.

  • AWS CLI — In addition to building the serverless apps locally, we will also need to access the AWS services programmatically. This can be achieved by installing the AWS CLI or the command-line interface, using which you can perform many administrative activities on your AWS Account.

  • AWS SAM CLI — In order to develop and test the applications locally, you need to install the AWS SAM CLI on your machine. The AWS SAM CLI will provide an AWS Lambda like execution environment using which you can run your code locally and get the output

  • Docker — Finally, you also need to get Docker installed on your machine if you want to test the application locally. The AWS SAM CLI will use Docker to mount an image where the execution will be performed. You can install Docker by visitinghttps://docs.docker.com/desktop/

  • Visual Studio Code — For developing the code, we are going to use the Visual Studio Code as the editor. You can download this fromhttp://code.visualstudio.com/
    Once you have installed all the pre-requisites on your machine, you can check the installed versions by running the following commands.

Python — python –version
AWS CLI — aws –version
AWS SAM CLI — sam –version
Docker — Docker –version

versions

I hope the content is useful for everyone. Thanks a lot!
Cheers!

Cristian Carballo
cristian.carballo3@gmail.com

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Hi! My name is Cristian Carballo and i am currently an AWS Community Builder.
  • Education
    Systems Engineer
  • Work
    Cloud Data Architect
  • Joined

More fromCristian Carballo

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp