Deployment
Last updated
Was this helpful?
Last updated
Was this helpful?
Check if you have properly configured serverless.yml before deploying, once cheked that run this command from your project directory.
Before deploying application to the AWS Lambda please check if you have successfully configured serverless framework here.
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 -
Click on add integration
Select Integration type as Lambda
Select your integration target and function as defined in serverless.yml
And then click on Next
In the next step of configuring routes -
Set Resourse Path as $default (To catch all paths)
Set Integration Target to your selected function.
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.
Yes, You have successfully deployed the API, now its time to play with it.