awslabs / amazon-kinesis-video-streams-producer-sdk-cpp

Amazon Kinesis Video Streams Producer SDK for C++ is for developers to install and customize for their connected camera and other devices to securely stream video, audio, and time-encoded data to Kinesis Video Streams.
Apache License 2.0
373 stars 336 forks source link

[QUESTION] keep credentials in credential-path fresh #645

Closed wlinInspire closed 3 years ago

wlinInspire commented 3 years ago

The credential-path example in https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/issues/477 is super helpful! Questions:

MushMal commented 3 years ago

Not sure what you mean. Your application will be the one to periodically supply fresh credentials in the file. This is how we can dynamically supply fresh credentials to the SDK. We don't have an example of code that refreshes the file but it's not very hard to create.

Alternatively, as described in the linked issue, you could simply use IoT credential provider which handles the fetching of the credentinals.

wlinInspire commented 3 years ago

@MushMal Yes. I have a separate program (controlled by a cron job) dedicated to periodically supply fresh credentials to the file. Then, If I start streaming using gstreamer kvssink plugin with credential-path specified to be this file, the streaming will keep running as long as the credentials in the file get updated periodically, right?

MushMal commented 3 years ago

Yep, just need to ensure the expiration is set correctly

hassanctech commented 3 years ago

@wlinInspire Were you able to get this to work? If your problem was solved please go ahead and resolve this issue.

wlinInspire commented 3 years ago

@hassanctech @MushMal It works. Thanks for the help