Issue
I'm writing software that runs on EC2 instances, and I want the software to verify its license using AWS's License Manager. However the License Manager is considered an AWS "service." In the documentation, it says I can just call the CheckoutLicense API action to verify a license. (https://docs.aws.amazon.com/license-manager/latest/userguide/seller-issued-licenses.html) But how would I do that? There's AWS SDK's, but they seem targeted towards managing EC2 instances from outside, and not running within the EC2 instance. Can I just link against the SDK and use it within the instance? If so, is the SDK aware that it's on an instance, and is it able to automatically connect to the License Manager service for example?
The closest advice I could find was from the AWS FAQ:
You will need to modify your software to call the API operations to verify a customer’s license before provisioning software capabilities. To simplify integration with the APIs, use the API operations, use AWS SDK.
(https://aws.amazon.com/license-manager/faqs/)
I want to do what the quote mentions, however I'm having a hard time searching for documentation/examples on how to do it. Any help is appreciated!
Solution
There's AWS SDK's, but they seem targeted towards managing EC2 instances from outside, and not running within the EC2 instance
SDKs are equally appropriate for use on EC2 instances.
In fact if you associate an IAM Role with the profile you'll get temporary credentials automatically provisioned and provided to the ec2 instance via the metadata service, and the SDKs use them automatically.
Answered By - erik258 Answer Checked By - Gilberto Lyons (WPSolving Admin)