DEV Community

SteveJin
SteveJin

Posted on • Updated on

SWS Console: Creating AWS Lambda CRUD APIs for DynamoDB and RDS DB tables.

My first developer career started as a Node.js full-stack developer. However, diving into full-stack development as a first career path often resulted in shallow learning, making it challenging to grasp all aspects thoroughly in practice.

Especially early on, I primarily focused on studying React and JavaScript, so before starting my developer career, I had mostly focused on frontend development.

Consequently, understanding API servers and databases was even more challenging for me, and it took a long time to study and comprehend them.

I believed that the above process wasn't unique to me alone. Therefore, while creating the SteveWebService console service, I aimed to provide features that would make it easier for developers facing similar challenges to build and handle APIs and databases. That's where the Lambda CRUD API Turn Key feature comes in. The idea is illustrated in the image below.

Image description

Through the Lambda CRUD API Turn Key feature on SteveWebService, users can select an SWS Project, choose either DynamoDB or RDS instance name, input the table or collection name, and generate CRUD APIs for the specified table or collection in AWS Lambda. These APIs are then connected to the API Gateway of the selected SWS Project, enabling immediate usage of CRUD APIs.

The reason for directly connecting Lambda Functions to API Gateway is that when creating an SWS Project (VPC Turn Key), the API Gateway is automatically generated.

Visit the Steve Web Service homepage

Explore Steve Web Service AWS VPC Turn Key functionality

We implemented the above idea and designed the input process as follows.

Image description

Isn't it incredibly easy? By creating it as described above, CRUD APIs for the selected database table are generated instantly.

Visit the Steve Web Service homepage

Explore Steve Web Service Lambda CRUD API Turn Key functionality

The benefits of being able to create CRUD APIs are as follows:

Elimination of the need for a dedicated CRUD API server, resulting in reduced server instance costs as AWS Lambda operates on a per-request pricing model.

Saving time by eliminating the need to develop a CRUD API server.

When developing simple microservices, placing business logic in the frontend removes the need for separate backend development, enabling rapid prototyping.

Now, after creating CRUD APIs using Lambda CRUD API Turn Key, how can you determine the endpoint and usage specifications?

By accessing the Detail screen of the SWS Project mentioned earlier, you'll find the API request endpoint and example code provided as shown in the image below.

Image description

Assuming that the image depicts an example scenario where a Lambda CRUD API was generated targeting a table named "test".

In the "Crud RDS Request Code" image:

The first select box represents selecting the method (e.g., GET, POST, PUT, DELETE).

The second select box allows choosing the technology stack to provide the request example code.

For the Route Path indicated by the second arrow, you should insert the path corresponding to "1번" (the first part) and preceding it is the API Gateway path.

With this, users can create APIs using the SteveWebService tool without the need to learn about AWS Cloud's API Gateway, Lambda, or CRUD API design, saving on server setup and operational costs, development time, and more! Isn't it amazing?

Continuing in this vein, we will keep developing tools that assist users in building cloud architectures without the need for extensive AWS Cloud knowledge, enabling developers to focus more on their business. Furthermore, we aim to provide value by allowing even small teams of developers to make the most of AWS resources.

The next article will delve into the history of solving different problems. End.

Visit the Steve Web Service homepage

Image description

Top comments (0)