Downloading large files with greengrass component deployment.

1

I'm trying to download large file as an 'Artifact' of a component - however it's 6GB and larger than the size limit allowed for these I believe. Ideally, I'd like someway for the deployment process to dynamically create a pre-signed URL when the component is deployed to the device - so I can then manually download it. Is there any facility for this ? Or any alternatives with greengrass environment ?

2 Answers
1
Accepted Answer

Hi majh -

Have you looked at downloading the artifact without a pre-signed URL? Greengrass provides your component with AWS credentials. See https://docs.aws.amazon.com/greengrass/v2/developerguide/interact-with-aws-services.html

Thanks, -joe

answered 3 months ago
  • Nice! I didn't realise that Greengrass provides credentials for the component. Thanks.

0

In case you have Python and Boto3 on the device you can use boto3 S3 client to download the file. The S3 client download_file function is optimized for the download of large files and would be more efficient than using curl or wget with a presigned URL.

[1] https://boto3.amazonaws.com/v1/documentation/api/latest/guide/s3-example-download-file.html

EXPERT
answered 3 months ago
  • Thanks - particularly for large files and mobile environments - is there any built-in functionality in here for continue/resume type operation - ie similar to 'curl -C -", or would this need to be implemented using something like 'aws s3api get-object with a --range option' and we need to handle the re-attempts on top of this ?

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.

Guidelines for Answering Questions