Deployment

Deploying to AWS Lambda

Check if you have properly configured serverless.yml before deploying, once cheked that run this command from your project directory.

$ serverless deploy

Before deploying application to the AWS Lambda please check if you have successfully configured serverless framework here.

Configuring API Gateway

Once the project is successfully deployed to AWS Lambda we have to link it to the API Gateway, to do so please follow following steps.

Login to your AWS account, and navigate to the API Gateway console from services and click on Create API button.

Select HTTP API type and click on Build.

After that in the Create and configure integrations option -

  1. Click on add integration

  2. Select Integration type as Lambda

  3. Select your integration target and function as defined in serverless.yml

  4. And then click on Next

In the next step of configuring routes -

  1. Set Resourse Path as $default (To catch all paths)

  2. Set Integration Target to your selected function.

  3. And finally click on Add route.

In the last AWS will ask you to configure stages, let it configure the $default stage and click on Next.

Finally AWS will ask you to confirm your deployment, check if you have selected proper lambda function integration and $default route is set to the selected integration. If everythin looks perfect click on Create.

Last updated

Was this helpful?