Skip to content

Java: Code example for Generating video with Nova Reel / Bedrock #7360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 30, 2025

Conversation

temnikovd
Copy link
Contributor

This PR introduces a Spring Boot service that integrates with Amazon Bedrock's Nova-Reel model to generate short videos based on text prompts. It includes a REST controller, a service layer that handles AWS Bedrock async requests, and a response model.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions github-actions bot added the Java-v2 This issue relates to the AWS SDK for Java V2 label Apr 9, 2025
@brmur brmur added the Feature Scenario A simple code example to show how certain tasks can be accomplished using several services and SDKs. label Apr 28, 2025
@brmur
Copy link
Contributor

brmur commented Apr 28, 2025

@temnikovd Can you please add the following text to the top of the appropriate files, per the return of the above check (https://github.com/awsdocs/aws-doc-sdk-examples/actions/runs/14425523221/job/41272075246?pr=7360):

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

Copy link
Contributor

@scmacdon scmacdon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Java files need to have:

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

Otherwise, it will not pass the check that allows use to merge it. Cna you please make these updates.

@temnikovd temnikovd requested a review from scmacdon April 28, 2025 21:35
@temnikovd
Copy link
Contributor Author

@temnikovd Can you please add the following text to the top of the appropriate files, per the return of the above check (https://github.com/awsdocs/aws-doc-sdk-examples/actions/runs/14425523221/job/41272075246?pr=7360):

// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0

@brmur @scmacdon - Thank you for the comments
I've added necessary lines

@brmur
Copy link
Contributor

brmur commented Apr 29, 2025

@temnikovd To add the example to the the AWS Code Libary (and the Bedrock Runtime Service Guide), can you please:

  1. add snippet tags (see below) around the code you want to display in https://github.com/temnikovd/aws-doc-sdk-examples/blob/nova_reel_java_example/javav2/usecases/video_generation_bedrock_nova_reel/src/main/java/com/example/novareel/VideoGenerationService.java
    I recommend:
  • // snippet-start:[bedrock-runtime.java2.NovaReel.VideoGeneration] on line 6 and
  • // snippet-end:[bedrock-runtime.java2.NovaReel.VideoGeneration] on line 100 of
  1. add the following yaml code to the bottom of .doc_gen/metadata/bedrock-runtime_metadata.yaml
bedrock-runtime_Scenario_GenerateVideos_NovaReel:
  title: Generate videos from text prompts using &BR; and Nova-Reel
  title_abbrev: "Generate videos from text prompts using &BR;"
  synopsis: a Spring Boot app that generates videos from text prompts using &BR; and the Nova-Reel model
  category: Scenarios
  languages:
    Java:
      versions:
        - sdk_version: 2
          github: javav2/example_code/bedrock-runtime
          excerpts:
            - description: Generate videos from text prompts using &BR; and Nova-Reel
              snippet_tags:
                - bedrock-runtime.java2.NovaReel.VideoGeneration
  services:
    bedrock-runtime: {StartAsyncInvoke, GetAsyncInvoke}

@temnikovd
Copy link
Contributor Author

@brmur thanks, I've updated the code, added metadata and tags

@brmur
Copy link
Contributor

brmur commented Apr 30, 2025

Updated metadata formatting. Builds no. @scmacdon to review prior to merge

@brmur brmur added the On Call Review complete On call review complete label Apr 30, 2025
@brmur brmur force-pushed the nova_reel_java_example branch from a652200 to a4440fd Compare April 30, 2025 15:54
@brmur brmur enabled auto-merge (squash) April 30, 2025 15:54
@brmur brmur disabled auto-merge April 30, 2025 15:54
@brmur brmur enabled auto-merge (squash) April 30, 2025 15:55
@brmur brmur merged commit 7d9e16f into awsdocs:main Apr 30, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Scenario A simple code example to show how certain tasks can be accomplished using several services and SDKs. Java-v2 This issue relates to the AWS SDK for Java V2 On Call Review complete On call review complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants