javav2/usecases/video_generation_bedrock_nova_reel/README.md
This is a Spring Boot application that provides a REST API to generate videos from text prompts using Amazon Bedrock and the Nova-Reel model.
The application enables asynchronous video generation using AWS Bedrock's amazon.nova-reel-v1:0 model and stores the generated videos in an S3 bucket.
It consists of:
Endpoint: POST /video/generate
Query Param: prompt (string)
Description:
amazon.nova-reel-v1:0 using BedrockEndpoint: POST /video/check
Query Param: invocationArn (string)
Description:
~/.aws/credentials)In VideoGenerationService.java, update the following line:
String s3Bucket = "s3://add_your_bucket_here";
Replace with your own S3 bucket URI where videos should be saved.
By default, credentials are loaded from a named profile using:
ProfileCredentialsProvider.create()
Make sure you have the profile set in your ~/.aws/config or override it as needed.
Because Amazon Bedrock writes a file to an Amazon S3 bucket on your behalf, the AWS role that you use needs permissions configured to allow the appropriate Amazon Bedrock and Amazon S3 actions The minimum action permissions required to execute this application are:
bedrock:InvokeModel
s3:PutObject
bedrock:GetAsyncInvoke
bedrock:ListAsyncInvokes
VideoGenerationService.java./mvnw spring-boot:runcurl -X POST "http://localhost:8080/video/generate?prompt=A cat surfing on a pizza in space"
curl -X POST "http://localhost:8080/video/check?invocationArn=<your-arn-here>"
when status is Completed - video generated and stored in S3 bucket
application.yml