Hi! Iβm Girish, an AWS Community Builder and Cloud Tech Enthusiast. In this article, Iβll share how I used AWS Kiroβs vibe coding feature to build a Customer Lookup API powered by API Gateway, Lambda, DynamoDB, and AWS SAM.
Unlike traditional IDEs, vibe coding in Kiro lets you code in flow with lightweight promptsβno need to over-specify requirements up front. Itβs perfect for experimenting, prototyping, and just βvibingβ with code.
Instead of manually wiring services together, I simply gave Kiro a natural-language prompt describing what I wanted, and within minutes I had a working, deployable prototype. Thatβs the magic of vibe coding!
What did I build and why?
I wanted to create a quick Customer Lookup API to demonstrate how fast you ca...
Hi! Iβm Girish, an AWS Community Builder and Cloud Tech Enthusiast. In this article, Iβll share how I used AWS Kiroβs vibe coding feature to build a Customer Lookup API powered by API Gateway, Lambda, DynamoDB, and AWS SAM.
Unlike traditional IDEs, vibe coding in Kiro lets you code in flow with lightweight promptsβno need to over-specify requirements up front. Itβs perfect for experimenting, prototyping, and just βvibingβ with code.
Instead of manually wiring services together, I simply gave Kiro a natural-language prompt describing what I wanted, and within minutes I had a working, deployable prototype. Thatβs the magic of vibe coding!
What did I build and why?
I wanted to create a quick Customer Lookup API to demonstrate how fast you can go from an idea to a working solution using Kiroβs vibe coding feature. Instead of manually setting up AWS resources, I described my requirements in plain English, and Kiro generated the project for me.
Hereβs what I ended up with:
- A REST API hosted on API Gateway
- This API supports CRUD operations:
- GET /customers β List all customers
- GET /customers/{custId} β Retrieve a specific customer
- POST /customers β Create a new customer
- PUT /customers/{custId} β Update an existing customer
- DELETE /customers/{custId} β Delete a customer
- A Lambda function for handling requests
- A DynamoDB table to store customer data (custId, Name, State, Zipcode)
- An AWS SAM template for building and deploying the entire stack
- Sample JSON events can be used to test the API.
The goal wasnβt to build a production-ready API right away, but to get a working prototype fast, something I can extend later with authentication, observability, monitoring, and performance tuning.
Architecture Overview
Hereβs a quick look at how the components work together:
Review Steps: From Prompt to Prototype
Step 1: Start a Vibe Coding Session
Open Kiro, switch to vibe coding mode, and simply type a natural prompt like:
"Build a customer lookup api as rest api. api will be hosted using aws gateway, integrated with a lambda function, data will be stored in a DynamoDB table, create a simple table to store this data with four fields - custId, Name, state, zipcode. do not create test framework as need to get a quick working prototype first before adding testing and performance framework. I would like to use AWS SAM to build and deploy this solution."
Kiro responded to me with below answer:
Step 2: Kiro Generates the Project files
In seconds, Kiro produced:
- A SAM template (template.yaml)
- A Lambda function (app.py)
- A DynamoDB table definition
- Sample JSON Events to test the API with
Example SAM template (simplified):
Step 3: Review the Lambda Function
Kiro generated a Python handler with DynamoDB integration:
Review Sample JSON Event
Step 4: Build & Deploy with SAM
Once I reviewed the files, it was just a matter of building and deploying.
Use the following command to build the function:
Command: sam build
You can deploy it to the AWS Cloud using the sam deploy command:
Command: sam deploy
Change Set
SAM packaged and deployed the API Gateway, Lambda, and DynamoDB resources in my AWS account.
Review using AWS Console
Since the resources have been deployed in my AWS account, I logged in to the AWS Management Console to verify them.
Hereβs what I checked:
- API Gateway β Confirmed the REST API with all CRUD endpoints (GET, POST, PUT, DELETE).
- Lambda Function β Validated that the function was created and linked to API Gateway.
- DynamoDB Table β Verified the customers table with attributes (custId, Name, State, Zipcode).
- CloudFormation / SAM Stack β Ensured the stack deployed successfully with all resources.
Step 5: Test the API
Now that I have the API endpoint, I will use the Postman to invoke the API and will review the response returned.
However before I invoke a GET request, I will use the command line to POST a record via API that will be stored in the DynamoDB CustomerTable.
Command: curl -X POST https://21374mswxh.execute-api.us-east-2.amazonaws.com/prod/customers \
-H "Content-Type: application/json" \
-d '{"custId":"CUST001", "name":"Girish", "state":"NY", "zipcode":"10001"}'
I will now invoke GET on this API endpoint using Postman. This should return the record that I added to the database.
This is a CRUD API, so it supports other operations as well. For this demonstration, however, I focused on POST and GETrequests, to create a record and fetch a record through the API endpoint.
Cleaning Up Resources
To avoid charges, donβt forget to clean up:
Since these resources were build and deployed using AWS SAM, these can be deleted using AWS SAM command.
Command: sam delete
Conclusion
In this article, I demonstrated how Kiro made it effortless to create a fully functional CRUD Customer Lookup REST APIintegrated with a database, using vibe coding to quickly build a working prototype.
Not only was the API generated, but an AWS SAM template was also created to support create, update, destroy, and recreate scenarios with Infrastructure as Code.
Generative AI is transforming the way code is built, and tools like Kiro make the process even easier. While debugging can become more challenging as more code is generated with GenAI, Kiroβs features such as spec-driven development and design documentation generation can help address these challenges.
I believe this is just the beginning, and these tools will continue to evolve rapidly!
I hope you found this helpful and informative.
Thank you for reading!
Watch the video here:
π’πΎππΎππ½ β¬π½πΆππΎπΆ
πππ ππ¦π³π΅πͺπ§πͺπ¦π₯ ππ°ππΆπ΅πͺπ°π― ππ³π€π©πͺπ΅π¦π€π΅
πππ ππ¦π³π΅πͺπ§πͺπ¦π₯ ππ¦π·π¦ππ°π±π¦π³ ππ΄π΄π°π€πͺπ’π΅π¦
πππ ππ¦π³π΅πͺπ§πͺπ¦π₯ ππ¦π―ππ ππ³π’π€π΅πͺπ΅πͺπ°π―π¦π³
πππ πππ°πΆπ₯ ππ¦π€π©π―π°ππ°π¨πΊ ππ―π΅π©πΆπ΄πͺπ’π΄π΅