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 réponses
1
Réponse acceptée

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
répondu il y a 2 ans
  • 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
EXPERT
répondu il y a 2 ans
  • 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 ?

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions