Skip to content

Commit d5dadf2

Browse files
author
dinsajwa
committed
feat(novasample): updated readme, architecture diagram, fixed trivy vunlerabilities
1 parent 19841bb commit d5dadf2

File tree

10 files changed

+173
-138
lines changed

10 files changed

+173
-138
lines changed

samples/amazon-nova-samples/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,11 @@ https://$CLOUDFRONT_URL/
106106
3. Commit your changes
107107
4. Push to the branch
108108
5. Create a Pull Request
109+
110+
## Clean Up
111+
112+
To clean up and remove all resources deployed by this solution:
113+
114+
1. Follow the [backend cleanup instructions](backend/README.md#clean-up) to remove backend resources
115+
2. Delete any additional CloudWatch log groups created during testing
116+
3. Ensure all S3 buckets are emptied before deletion

samples/amazon-nova-samples/backend/Dockerfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
1-
FROM gradle:7.6-jdk21 AS build
1+
FROM gradle:8.6.0-jdk21 AS build
22

33
WORKDIR /app
44
COPY . .
55
# Ensure we build a proper executable JAR with manifest
66
RUN gradle build --no-daemon
77

8-
FROM openjdk:21-slim
8+
FROM eclipse-temurin:21.0.2_13-jre-jammy
99

1010
# Create a non-root user
1111
RUN groupadd -r appuser && useradd -r -g appuser appuser
1212

1313
WORKDIR /app
1414
COPY --from=build /app/app/build/libs/*.jar app.jar
1515

16+
# Update system packages to fix vulnerabilities
17+
RUN apt-get update && \
18+
apt-get upgrade -y && \
19+
apt-get clean && \
20+
rm -rf /var/lib/apt/lists/*
21+
1622
# Set environment variables
1723
ENV AWS_REGION=us-east-1
1824
ENV PORT=8080

samples/amazon-nova-samples/backend/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,3 +233,31 @@ artillery report report.json
233233
3. Document infrastructure changes
234234
4. Update load tests as needed
235235
5. Create detailed pull requests
236+
237+
## Clean up
238+
239+
Before destroying the stack, perform these cleanup steps in order:
240+
241+
1. Remove all data from the Amazon Simple Storage Service (Amazon S3) buckets:
242+
- Frontend static assets bucket
243+
- Access logging bucket
244+
- Any other S3 buckets created by the stack
245+
246+
2. Delete CloudWatch logs:
247+
- Navigate to CloudWatch in the AWS Console
248+
- Find and delete the following log groups:
249+
- `/aws/fargate/nova-sonic` (WebSocket server logs)
250+
- `/aws/lambda/*` (any Lambda function logs)
251+
- `/aws/cloudfront/*` (CloudFront access logs)
252+
- Any other log groups created during testing
253+
254+
3. Destroy the stack:
255+
```shell
256+
cdk destroy
257+
```
258+
259+
4. After stack deletion, verify:
260+
- All CloudWatch log groups are deleted
261+
- All S3 buckets are removed
262+
- All ECR repositories are cleaned up
263+
- No orphaned resources remain in your AWS account

samples/amazon-nova-samples/backend/app/build.gradle.kts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ dependencies {
2121
implementation("software.amazon.awssdk:regions")
2222

2323
// Jetty WebSocket dependencies
24-
implementation("org.eclipse.jetty:jetty-server:11.0.15")
25-
implementation("org.eclipse.jetty:jetty-servlet:11.0.15")
26-
implementation("org.eclipse.jetty.websocket:websocket-jetty-server:11.0.15")
27-
implementation("org.eclipse.jetty.websocket:websocket-jetty-client:11.0.15")
28-
implementation("org.eclipse.jetty.websocket:websocket-jetty-api:11.0.15")
24+
implementation("org.eclipse.jetty:jetty-server:11.0.16")
25+
implementation("org.eclipse.jetty:jetty-servlet:11.0.16")
26+
implementation("org.eclipse.jetty.websocket:websocket-jetty-server:11.0.16")
27+
implementation("org.eclipse.jetty.websocket:websocket-jetty-client:11.0.16")
28+
implementation("org.eclipse.jetty.websocket:websocket-jetty-api:11.0.16")
2929
implementation("jakarta.servlet:jakarta.servlet-api:6.0.0")
3030

3131
// Jackson for JSON handling
@@ -52,7 +52,8 @@ dependencies {
5252

5353
// Logging
5454
implementation("org.slf4j:slf4j-api:2.0.7")
55-
implementation("ch.qos.logback:logback-classic:1.4.11")
55+
implementation("ch.qos.logback:logback-classic:1.4.12")
56+
implementation("ch.qos.logback:logback-core:1.4.12")
5657

5758
// Testing
5859
testImplementation("org.junit.jupiter:junit-jupiter:5.9.2")

samples/amazon-nova-samples/docs/images/NovaSonic.drawio

Lines changed: 122 additions & 0 deletions
Large diffs are not rendered by default.
472 KB
Loading

samples/amazon-nova-samples/images/speechToSpeech_home.png renamed to samples/amazon-nova-samples/docs/images/speechToSpeech_home.png

File renamed without changes.

samples/amazon-nova-samples/images/speechToSpeech_sample.png renamed to samples/amazon-nova-samples/docs/images/speechToSpeech_sample.png

File renamed without changes.

samples/amazon-nova-samples/images/BedrockNovaSonicSolution.drawio

Lines changed: 0 additions & 130 deletions
This file was deleted.
-78 KB
Binary file not shown.

0 commit comments

Comments
 (0)