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 ?

majh
已提問 2 年前檢視次數 272 次
2 個答案
1
已接受的答案

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

AWS
已回答 2 年前
  • 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

AWS
專家
已回答 2 年前
  • 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 ?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南