AWS S3
Upload and download from S3 buckets
AWS S3
Introduction
The Blecon AWS S3 integration securely stores device events in S3 buckets. It also allows devices to download the contents of S3 buckets.
With this integration, you can easily log any amount of device data for further processing, and allow devices to download configuration or firmware.
Uploading Data
The S3 integration places device events in the bucket in JSON format. It names the event files as follows:
Note that your device must send a Blecon request of type Message to upload data.
Downloading Data
The S3 integration supports two methods for downloading data from a bucket.
Method: Device ID
The response will be the contents of /<device_id>
from the bucket, if any.
Method: Filename
The filename should be supplied as an ASCII string in the request's payload. The response will be the contents of that location.
Preparing your AWS account
Log into or create an AWS account.
Note Region
Note the region in use, which is found in the top right of the AWS Console.
Create Bucket
Navigate to the S3 service in the AWS Console, and create a new bucket. You will need to choose a globally unique name.
Create IAM Policy
Noting the bucket name you created, create a policy like the below.
For ease of creating, select the JSON editor, paste the below, and insert your bucket name where indicated.
Create IAM Role
Now that we've created the policy, we can create a role, and attach the policy to it.
<<<<<<< HEAD Navigate to the IAM service in the AWS Console and select Create Role. For Trusted Entity, choose AWS account and enter 202578976232.
Click next, then find the policy you created in the previous step, and attach it to the role.
Navigate to the IAM service in the AWS Console and select Create Role. For Trusted Entity, choose AWS account and enter 329599652485
Click next, then find the policy you created in the previous step and attach it to the role.
main
Click next and note the below on role naming, or the integration will not work.
Ensure the role has a name that begins with the text BleconIntegrationRole
Find the role in the list of roles, and copy the ARN.
Configuring the Integration
Now you should have everything you need to configure the Blecon integration:
Bucket Name
IAM Role ARN
Region
Bucket Name
The namespace is your choice. Device requests must use this namespace to be routed to this integration.
If you have questions, feel free to contact us!
Last updated