You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sample-apps/s3-java/README.md
+12-3
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
The project source includes function code and supporting resources:
6
6
7
-
-`src/main` - A Java function.
7
+
-`src/main` - A Java Lambda function that scales down an image stored in S3.
8
8
-`src/test` - A unit test and helper classes.
9
9
-`template.yml` - An AWS CloudFormation template that creates an application.
10
10
-`build.gradle` - A Gradle build file.
@@ -63,10 +63,14 @@ You can also build the application with Maven. To use maven, add `mvn` to the co
63
63
...
64
64
65
65
# Test
66
-
To upload an image file to the application bucket and trigger the function, run `4-upload.sh`.
66
+
This Lambda function takes an image that's currently stored in S3, and scales it down into
67
+
a thumbnail-sized image. To upload an image file to the application bucket, run `4-upload.sh`.
67
68
68
69
s3-java$ ./4-upload.sh
69
70
71
+
In your `s3-java-bucket-<random_uuid>` bucket that was created in step 3, you should now see a
72
+
key `inbound/sample-s3-java.png` file, which represents the original image.
73
+
70
74
To invoke the function directly, run `5-invoke.sh`.
71
75
72
76
s3-java$ ./5-invoke.sh
@@ -75,7 +79,12 @@ To invoke the function directly, run `5-invoke.sh`.
75
79
"ExecutedVersion": "$LATEST"
76
80
}
77
81
78
-
Let the script invoke the function a few times and then press `CRTL+C` to exit.
82
+
Let the script invoke the function a few times and then press `CRTL+C` to exit. Note that you
83
+
may see function timeouts in the first few iterations due to cold starts; after a while, they
84
+
should begin to succeed.
85
+
86
+
If you look at the `s3-java-bucket-<random_uuid>` bucket in your account, you should now see a
87
+
key `resized-inbound/sample-s3-java.png` file, which represents the new, shrunken image.
79
88
80
89
The application uses AWS X-Ray to trace requests. Open the [X-Ray console](https://console.aws.amazon.com/xray/home#/service-map) to view the service map.
0 commit comments