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.

已提问 2 年前467 查看次数
1 回答
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
专家
已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则