Context:
Contribution from Amazon Community Builder to AI Engineering Month : Amazon Nova
📌 The Need for a Software Artifact Generator
To be successful in the cutthroat market of today, the modern software development process needs to be quick, reliable, and efficient in productivity. While working in Software industries for a long time, I have observed that the software developers often spend a huge time on documentation for the software which includes System requirement specification, HLD, LLD, Technical design & architecture, Data model etc. These tasks can become bottlenecks, especially when building MVPs, prototypes, or internal tools. They slow down innovation and introduce inconsistencies across teams. To provide solution to this problem, I built a serverless API using AWS Lambda, API Gateway, and Amazon Bedrock's Nova foundation model to generate software artifacts on demand.
This post shares the architecture and implementation steps including code to build this prompt-to-artifact API.
Why Amazon Nova on Bedrock?
Amazon Nova is a powerful LLM available through Amazon Bedrock. It stands out due to its:
High performance in software development tasks
Strong contextual understanding
Seamless integration with other AWS services
No need for managing infrastructure
Using Nova allowed me to focus on prompt engineering and orchestration rather than worrying about model deployment, scalability, or latency.
Architecture Overview
Components Used:
• Amazon API Gateway: Exposes the API endpoint to accept user prompts.
• AWS Lambda (Python): Handles request processing and integrates with Bedrock to invoke the Nova model.
• Amazon Bedrock (Nova model): Powers the natural language-to-artifact generation.
This architecture is:
• Fully serverless
• Scalable and cost-efficient
• Easy to extend with logging, authentication, and additional models
Prompt-to-Artifact Flow
- User submits a prompt via a RESTful endpoint.
- Lambda processes the prompt and sends it to Amazon Bedrock.
- Nova generates the software artifact, such as:
- Software requirement specification
- High level design
- Low level design
- REST API boilerplate
- Configuration files (e.g., Dockerfile, serverless.yml)
- Lambda returns the result in a structured JSON response. ________________________________________
Implementation Steps:
Step-1: Login into AWS console and open Amazon Bedrock. First of all you need to request access for particular Amazon Nova model which one you want to use. Go to the ‘Model catalog’ from left-side menu list, filter on ‘Amazon’ and then click on ‘Available to request’ for particular model. I have requested access to Nova Lite & Nova Micro and it has been granted.
Step-2: Create AWS Lambda function with following code. This function calls Amazon Bedrock API with particular Amazon Nova model id.
import json
import boto3
bedrock_client = boto3.client('bedrock-runtime', region_name='us-east-1') # Adjust region if needed
def lambda_handler(event, context):
try:
body = json.loads(event["body"])
print(body)
prompt = body.get("prompt", "")
print(prompt)
model_input = {
"messages": [
{
"role": "user",
"content": [
{
"text": prompt
}
]
}
],
"inferenceConfig": {
"maxTokens": 2048,
"temperature": 0.7,
"topP": 0.9
}
}
response = bedrock_client.invoke_model(
modelId="amazon.nova-micro-v1:0",
body=json.dumps(model_input),
contentType="application/json",
accept="application/json",
)
response_body = json.loads(response['body'].read())
generated_text = response_body['output']['message']['content'][0]['text']
return {
"statusCode": 200,
"headers": {"Content-Type": "application/json"},
"body": json.dumps({"artifact": generated_text.strip()})
}
except Exception as e:
return {
"statusCode": 500,
"body": json.dumps({"error": str(e)})
}
2.1: Go to Lambda function screen and create new Lambda function from scratch.
2.2: create IAM role and give two permissions to it as shown in below screen-shot. Then assign this IAM role to the Lambda as execution role as per above screen-shot.
2.3: Deploy the Lambda function. Then go to the ‘Code’ section of Lambda function and copy paste above given code and re-deploy the function again.
Step-3: Create HTTP POST API in AWS API Gateway and integrate it with Lambda function.
3.1: Create new HTTP API and integrate Lambda function with it.
3.2: Configure route and HTTP method for the API.
3.3: Define stage for the API.
3.4: Deploy the API.
Step-4: Call API from postman passing appropriate prompt in API request body.
Sample Use Case
Prompt:
" Generate requirement specification for small ecommerce website. Give response in markdown format."
API Response:
{"artifact": "# Requirement Specification for Small E-commerce Website\n\n## 1. Introduction\nThis document outlines the requirements for a small e-commerce website that allows users to browse, purchase, and manage products online.\n\n## 2. Overall Description\n\n### 2.1 Purpose\nThe purpose of this e-commerce website is to provide a platform for customers to browse and purchase products online, manage their orders, and track their delivery.\n\n### 2.2 Scope\nThe scope includes the development of a user-friendly website that supports product listings, shopping cart functionality, user accounts, payment processing, and order management.\n\n### 2.3 Stakeholders\n- Customers: End-users who purchase products.\n- Admin: Users who manage the products, prices, and inventory.\n- Developers: Team responsible for the development and maintenance of the website.\n\n### 2.4 Assumptions\n- The website will be accessible via desktop and mobile devices.\n- Internet connectivity is required for accessing the website.\n- Payment gateways will be integrated for secure transactions.\n\n### 2.5 Dependencies\n- Payment gateway services (e.g., PayPal, Stripe).\n- Hosting services for website deployment.\n- Third-party APIs for inventory management and shipping.\n\n## 3. Functional Requirements\n\n### 3.1 User Registration and Authentication\n- FR1: Users must be able to register with an email and password.\n- FR2: Users must be able to log in with their credentials.\n- FR3: Users must be able to reset their password if forgotten.\n- FR4: Admin users must have access to manage user accounts.\n\n### 3.2 Product Management\n- FR5: Admin users must be able to add, update, and delete products.\n- FR6: Products must have details including name, description, price, and inventory count.\n- FR7: Products must be categorized by type.\n- FR8: Admin users must be able to upload product images.\n\n### 3.3 Product Catalog\n- FR9: Customers must be able to browse products by category.\n- FR10: Customers must be able to view product details including images, descriptions, and prices.\n- FR11: Customers must be able to sort and filter products by price, popularity, and ratings.\n\n### 3.4 Shopping Cart\n- FR12: Customers must be able to add products to their shopping cart.\n- FR13: Customers must be able to view and update their shopping cart.\n- FR14: Customers must be able to remove products from their shopping cart.\n\n### 3.5 Order Management\n- FR15: Customers must be able to proceed to checkout and complete their purchase.\n- FR16: Customers must be able to select shipping and payment methods.\n- FR17: Customers must be able to view their order history and details.\n- FR18: Admin users must be able to track order statuses and manage shipments.\n\n### 3.6 Payment Processing\n- FR19: The website must integrate with a payment gateway to process payments securely.\n- FR20: Customers must receive payment confirmation and order details via email.\n\n### 3.7 User Account Management\n- FR21: Users must be able to view and update their account information.\n- FR22: Users must be able to view their order history.\n\n## 4. Non-Functional Requirements\n\n### 4.1 Performance\n- NFR1: The website must load within 3 seconds under normal conditions.\n- NFR2: The website must handle at least 100 concurrent users without performance degradation.\n\n### 4.2 Security\n- NFR3: User data must be encrypted during transmission.\n- NFR4: The website must comply with PCI DSS standards for payment processing.\n- NFR5: The website must implement measures to prevent SQL injection, cross-site scripting (XSS), and other common web vulnerabilities.\n\n### 4.3 Usability\n- NFR6: The website must be accessible and usable on both desktop and mobile devices.\n- NFR7: The website must provide clear and intuitive navigation.\n\n### 4.4 Reliability\n- NFR8: The website must be available 99.9% of the time.\n- NFR9: The website must have a backup and recovery plan in place.\n\n### 4.5 Maintainability\n- NFR10: The website must be modular and well-documented to facilitate future updates and maintenance.\n\n## 5. Appendices\n\n### 5.1 Glossary\n- E-commerce: Electronic commerce, the buying and selling of goods or services using the internet.\n- PCI DSS: Payment Card Industry Data Security Standard, a set of security standards for organizations that handle branded cards.\n\n### 5.2 References\n- PCI DSS Standards\n- Web Accessibility Guidelines\n\n---\n\nThis document serves as a comprehensive guide for the development of the small e-commerce website, ensuring that all functional and non-functional requirements are met."}
Next Steps
You can create front-end and integrate this API so prompt can be passed through front-end to generate software artifacts.
Conclusion
Amazon Nova is a transformative model for developers. With just a prompt, it can accelerate software creation from hours to minutes. Combined with AWS Lambda and API Gateway, Nova becomes a powerful ally in building intelligent, prompt-driven developer tools.
I’m excited to continue building and sharing more tools like this—and grateful to be part of the Amazon Community Builders program where innovation meets opportunity.
Resources and References:
• Amazon Bedrock Documentation https://docs.aws.amazon.com/bedrock/
• AWS Lambda Python Guide
https://docs.aws.amazon.com/lambda/latest/dg/lambda-python.html
• API Gateway with Lambda Integration
https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-integrate-with-lambda.html