Skip to content
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

ELB target group retrieval issue #7

Closed
IvanNoronha-TomTom opened this issue Feb 28, 2021 · 3 comments
Closed

ELB target group retrieval issue #7

IvanNoronha-TomTom opened this issue Feb 28, 2021 · 3 comments

Comments

@IvanNoronha-TomTom
Copy link

IvanNoronha-TomTom commented Feb 28, 2021

I'm using the the script for an on-demand to spot conversion with the invocation

./ec2-spot-converter --stop-instance --review-conversion-result --instance-id <id> --update-cw-alarms --check-targetgroups * --wait-for-tg-states

Output:

[INFO] 2021-02-28 06:07:19,059 ec2-spot-converter - [STEP 1/26] Read DynamoDB state table...
[INFO] 2021-02-28 06:07:19,116 ec2-spot-converter -   => SUCCESS. Record '<id>' read succesfully.
[INFO] 2021-02-28 06:07:19,142 ec2-spot-converter - [STEP 2/26] Discover instance state...
[ERROR] 2021-02-28 06:07:19,631 ec2-spot-converter - Failed to list target groups: An error occurred (ValidationError) when calling the DescribeTargetGroups operation: 'ec2-spot-converter' is not a valid target group ARN.
[ERROR] 2021-02-28 06:07:19,631 ec2-spot-converter - Failed to perform step 'DiscoverInstanceState'! Reason=Failed to retrieve ELB target groups!

I've used the latest policy.json attached as an IAM role.
Not sure if it needs the * to be in quotes?

Update: The load balancer in use is an application load balancer

@IvanNoronha-TomTom
Copy link
Author

Okay so I got it working by individually specifying ARNs of all the target groups to which the instance was registered

@jcjorel
Copy link
Owner

jcjorel commented Mar 1, 2021

Hi,
Thanks for highlighting this.
I have think to remove the wildcard that is sensitive to shell substitution in command arguments...

@jcjorel
Copy link
Owner

jcjorel commented Mar 2, 2021

v0.11.0 released!

@jcjorel jcjorel closed this as completed Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants