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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠