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.

preguntada hace 2 años467 visualizaciones
1 Respuesta
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
EXPERTO
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas