Greengrass V2 Custom Component having S3client | Java

0

we have requirement to download/upload files in S3 using GreengrassV2 Custom component. Can anyone help how we can get the S3client Object with provided credential. We have created thing with role-alias which has S3 Get/Put access. As GreengrassV2 thing has already access policy, How can we create S3 Object? How the credential exchange in custom-component in java.

demandé il y a 2 ans467 vues
1 réponse
0

Hi there! So one thing you will need to do is deploy the Token exchange service component. The token exchange service component (aws.greengrass.TokenExchangeService) provides AWS credentials that you can use to interact with AWS services in your custom components.

With that being said, I would also considering using the Greengrass Stream Manager component? It contains an S3 destination option and handles all that data transfer logic for you. Has a bunch of features, but you simply just add the file to the S3 stream and StreamManager will upload the object to S3 for you.

Greengrass StreamManager Component

Sample Code in Java to export objects to S3 using Stream Manager

Hope this helps!

profile pictureAWS
EXPERT
répondu il y a 2 ans

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