-
Notifications
You must be signed in to change notification settings - Fork 793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GetSpotInstancesAction to retrieve action from spot instances like on demand instances #5142
Comments
@RayaneABDI you can use the Note that |
@debora-ito thank you for your reply but that’s make no sense why can we get instance action from on-demand instances and not from spot instances |
Without diving into the code, I'd say the SDK doesn't use the spot instance metadata internally. |
Okay I will try thank you ! |
Describe the feature
Currently, the aws-sdk-java includes the method getInstanceAction(), which retrieves data from the URL "/latest/meta-data/instance-action". However, to access the action of a spot instance, we must retrieve it from the URL "/latest/meta-data/spot/instance-action".
Use Case
I aim to determine if AWS will claim my spot instance, and when, adjusting my calculations accordingly. I prefer not to utilize the AWS CLI since I'm already employing the AWS SDK for Java.
Proposed Solution
Other Information
No response
Acknowledgements
AWS Java SDK version used
2.25.17
JDK version used
openjdk version "17.0.8.1"
Operating System and version
Linux
The text was updated successfully, but these errors were encountered: