Skip to content

aws-greengrass-stream-manager-sdk-python upload?

0

It seems to me this SDK only supports uploading to AWS S3 from the core device -- but it does not support downloading to core device from S3? That right and if so what is Greengrass custom component best way to download from S3 to core device?

2 Answers
1

Hi,

AWS Labs has released this component to download from S3 with GreenGrass: https://github.com/awslabs/aws-greengrass-labs-s3-file-downloader

Note: it's Java. You would have to accept a polyglot application.

Best,

Didier

EXPERT
answered 10 months ago
EXPERT
reviewed 10 months ago
  • I did see that too. Problem is I'm looking for Python not Java :(

0
Accepted Answer

You are correct in your understanding. The AWS Greengrass Stream Manager SDK for Python primarily supports uploading data from the core device to AWS S3, but it does not provide direct functionality for downloading from S3 to the core device.

The Stream Manager is designed to handle data streams from edge devices to the cloud, with a focus on exporting data to various AWS services, including S3. Its main purpose is to manage the flow of data from the edge to the cloud, not the other way around.

For downloading data from S3 to a Greengrass core device, you would typically use a different approach within your custom component. The recommended method would be to use the AWS SDK for Python (Boto3) directly in your Greengrass custom component.

To implement this in a custom component:

  1. Include the Boto3 library in your component's dependencies.
  2. In your component's code, use Boto3's S3 client to download objects from your S3 bucket.
  3. Ensure your component has the necessary permissions to access the S3 bucket.

This approach allows you to have more control over the download process and integrate it seamlessly with your component's logic. It's a more flexible solution for retrieving data from S3 to your Greengrass core device compared to using the Stream Manager, which is optimized for outbound data flow.
Sources
Greengrass v2 upload non-file to S3 using StreamManager | AWS re:Post
Create custom components that use stream manager - AWS IoT Greengrass

answered 10 months ago
EXPERT
reviewed 10 months ago
  • Ok. I can do boto3. What I was hoping to do though was not have to create a separate set of credentials. boto3 I think requires its own secret key. But, I can use boto3

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.