david-fisher / 320-F19-Track-I

Track I's group repo
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

Set Up SFTP to S3 Bucket for Hobolink #76

Closed GitThePower closed 4 years ago

GitThePower commented 4 years ago

PRICING INFO: -SFTP server endpoint: $0.30/hour -SFTP data uploads and downloads: $0.04/GB

STEPS:

  1. Log into the AWS management console with a role that has create permissions

  2. Select the "Services" drop down menu at the top of the page and search for "SFTP"

  3. In the search results, select "AWS Transfer for SFTP"

  4. From the AWS Transfer for SFTP console, navigate to and select the "Create server" button

  5. On the server creation page, leave the default settings in place and select the "Create server" button

  6. Log into "https://www.hobolink.com" with the orchard watch credentials

  7. In the console, navigate to and open the "Data" dropdown menu in the sidebar and select "Data Delivery"

  8. Select "Create New Delivery"

  9. In "General Settings", enter a name, set the delivery to 1 hour and check the "Active" check box

  10. In "Select Data to Export", choose the file named "20699245 - Over the last hour"

  11. In "Data Destination", check the "FTP (or SFTP)" check box, enter {serverId}.server.transfer.{regionId}.amazonaws.com in the "Server" field, and ensure the orchard watch credentials are entered in the "Username" and "Password" fields

  12. Bellow these fields, check the "Use secure connection (SFTP)" check box, check the "Use certificate" checkbox that appears bellow that, then select "Download Public Key" and copy the whole key

  13. Return to the AWS Transfer for SFTP console, choose the newly created server, and select the "Add user" button

  14. On the add user page, enter a username in the "Username" field, select an S3 Bucket from the drop down under "Home directory", and select an IAM role from the drop down under "Access"

  15. Under "SSH public keys", enter the copied key from hobolink, then select the "Add" button

  16. Return to the hobolink delivery creation page and select the "Test Connection" button

  17. Upon successful test completion, select the "Save" button to save the data delivery settings

GitThePower commented 4 years ago

REFERENCE: https://aws.amazon.com/blogs/aws/new-aws-transfer-for-sftp-fully-managed-sftp-service-for-amazon-s3/

https://www.hobolink.com/HLHelp/Content/B_Configure_Devices/sftp-certificate.htm

GitThePower commented 4 years ago

WORK AROUND: Hobolink did not want to SFTP with the s3 bucket, so we could try turning the s3 into an email server and send hourly emails with the data file instead. Here's the guide:

https://docs.aws.amazon.com/ses/latest/DeveloperGuide/receiving-email-getting-started.html

GitThePower commented 4 years ago

Work around was successful. Data is streaming into S3