DEV Community

Pedram Hamidehkhan
Pedram Hamidehkhan

Posted on

Easiest way to create a serverless backend in AWS using UI

I've recently discovered a new way to create serverless backend in AWS using the GUI. Of course, creating lambda functions and dynamodb tables through the UI isn't really difficult. The main point is to get everything as Code at the end. This is a really long awaited feature in aws, which is finally being delivered. Now you can configure your infrastructure through the AWS console, and then export it as code. You can use CDK or SAM as the export target. A similar feature has been offered by azure (exporting ARM templates), but it is great to see AWS is offering this feature.

As opposed to previous posts, in this one we only work with the GUI (AWS Console).

So after logging in to the aws console, go to Lambda section and click on Applications.

Image description

After that you see the following options:

Image description

As you can see, you can not do everything using this method, but you have quite a few options.
We go ahead and create a Serverless Backend API. This will generate a new API Gateway, a few Lambda Functions and a DynamoDB Table.
Please note that at this moment only Node.js 14 is supported. It is also worth mentionning that the generated code can be exported to github or to aws code commit.

Image description

So go ahead and click on next to go to the page where you can specify your application name, github/codecommit repository and whether you want the export to be SAM or CDK. If you want to export to github, you need to make a connection between your aws account and github. Click on "Connect with CodeStar Connections". In the popup window choose a name fo the connection and click "connect to github". After that a pop-up window will appear, asking you for your credentials. After entering your credentials your connection is there and you can go ahead and click on "create" on the bottom of the page.

And that is IT! it takes a few minutes for all the resources to be created and for the code to be available in github. The cherry on top is, that using this method you already get a functioning CICD pipeline! As a matter of fact, aws configures code Pipeline and CodeBuild and connects them to your github repository for you. So every time you make a change and push it to github, the change will be automatically deployed to aws.

It might be a bit difficult to follow using only text, so I went ahead and created a vide, which hopefully will be easier to follow.

    Youtube: https://youtu.be/z8lDx2l7f0w
Enter fullscreen mode Exit fullscreen mode

That is it. Thank you very much for reading this post.

Top comments (0)