Serverless Text-to-Image Generation with Amazon Bedrock Nova Canvas

Amazon API Gateway REST API → AWS Lambda → Amazon Bedrock → Amazon S3

Serverless text-to-image generation using Amazon API Gateway, AWS Lambda and Amazon Bedrock's Nova Canvas model for submitting prompts and S3 storage for images.

The solution works by receiving a text prompt to an API Gateway endpoint, which triggers a Lambda function containing the request. The Lambda function then formats this prompt and makes a call to Amazon Bedrock's Nova Canvas model to generate an image based on the text description and the generated image is saved to the S3 bucket.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/apigw-bedrock-nova-canvas

Deploy

terraform initterraform apply


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

terraform destroy
terraform show

Created by:

Archana V

Archana V

Solutions Architect at AWS

Follow on LinkedIn