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
# Creating an example AWS photo analyzer application using the AWS SDK for Java
2
2
3
+
## Purpose
3
4
You can create an AWS application that analyzes nature images located in an Amazon Simple Storage Service (Amazon S3) bucket by using the Amazon Rekognition service.
4
5
5
6
The application can analyze many images and generate a report that breaks down each image into a series of labels.
@@ -26,10 +27,6 @@ This application uses the following AWS services:
26
27
* Amazon SES
27
28
* AWS Elastic Beanstalk
28
29
29
-
**Cost to complete:** The AWS services included in this document are included in the [AWS Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc).
30
-
31
-
**Note:** Be sure to terminate all of the resources you create while going through this tutorial to ensure that you’re no longer charged for them.
32
-
33
30
#### Topics
34
31
35
32
+ Prerequisites
@@ -50,7 +47,17 @@ To complete the tutorial, you need the following:
50
47
+ A Java IDE (this tutorial uses the IntelliJ IDE)
51
48
+ Java JDK 1.8
52
49
+ Maven 3.6 or later
53
-
+ An Amazon S3 bucket named **photos[somevalue]**. Be sure to use this bucket name in your Amazon S3 Java code. For information, see [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html).
50
+
51
+
### Important
52
+
53
+
+ The AWS services included in this document are included in the [AWS Free Tier](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc).
54
+
+ This code has not been tested in all AWS Regions. Some AWS services are available only in specific regions. For more information, see [AWS Regional Services](https://aws.amazon.com/about-aws/global-infrastructure/regional-product-services).
55
+
+ Running this code might result in charges to your AWS account.
56
+
+ Be sure to terminate all of the resources you create while going through this tutorial to ensure that you’re not charged.
57
+
58
+
### Creating the resources
59
+
60
+
Create an Amazon S3 bucket named **photos[somevalue]**. Be sure to use this bucket name in your Amazon S3 Java code. For information, see [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/gsg/CreatingABucket.html).
54
61
55
62
## Understand the AWS Photo Analyzer application
56
63
@@ -62,6 +69,10 @@ To generate a report, enter an email address and choose **Analyze Photos**.
62
69
63
70

64
71
72
+
You can also download a given image from the Amazon S3 bucket by using this application. Simply specify the image name and choose the **Download Photo** button. The image is downloaded to your browser, as shown in this illustration.
73
+
74
+

75
+
65
76
## Create an IntelliJ project named SpringPhotoAnalyzer
66
77
67
78
1. In the IntelliJ IDE, choose **File**, **New**, **Project**.
@@ -359,6 +370,8 @@ The following Java code represents the **PhotoApplication** class.
359
370
360
371
The following Java code represents the **PhotoController** class that handles HTTP requests. For example, when a new image is posted (uploaded to an S3 bucket), the **singleFileUpload** method handles the request.
361
372
373
+
**Note**: Be sure that you change the **bucketName** variable to your Amazon S3 bucket name.
**Note:** There are other CSS files located in the GitHub repository that you must add to your project. Ensure all of the files under the **resources** folder are included in your project.
0 commit comments