Amazon AWS cloud-based tools can significantly increase the capabilities of ARTIK modules. The article here describes installation and test of the AWS Simple Storage Service (S3), the basis for many other services.
This tutorial is designed for use with the ARTIK 530 or 710 board with the Ubuntu OS installed.
- Follow the introductory article to set up the CLI, your account, and your credentials.
Setting Up Amazon AWS S3 Account
Sign up for the Amazon S3 storage service for storing the pictures taken by the camera. You will need to use the same geographic area in both S3 and Rekognition. Otherwise, the picture uploaded will not be properly recognized.
If you have not already done the Node-RED tutorial, go to step 3 of Node JS setup to make Node JS and npm available on your system.
cdto get back to the root.
Install the Amazon S3 Image Uploader to your board. It uses Imagemagick for scaling the images.
apt install imagemagick
npm install s3-uploader --save
Display the Upload.js code and copy it to your board to a file of the same name. It uploads an image file to the S3 account.
In S3, set up a bucket. We called ours 'artiktest1'. You'll need to choose your own unique name and change the Upload.js file to match (AWS S3 doesn't allow multiple uses of the same bucket name).
Copy a test file. Save an image file to the root of your ARTIK board as
img_trashcan.jpgand make sure you save a JPEG file. Ideally it should contain some common objects that will be identifiable by sight.
Run the code to upload the image file to AWS.
Verify that your test image is in the expected AWS S3 bucket.
Use a proxy? The upload may fail with a timeout. Try going through an un-proxied connection first to verify that your settings are otherwise valid.