aws-solutions / centralized-logging-with-opensearch

Build your own log analytics platform on OpenSearch in 20 minutes
https://aws.amazon.com/solutions/implementations/centralized-logging-with-opensearch/
Apache License 2.0
108 stars 28 forks source link

Instances can not be listed if account is switched on the Instance Group list page #291

Closed owenCCY closed 3 months ago

owenCCY commented 4 months ago

Describe the bug

image If you have more than 50 instances in our main account, you will get a nextToken after the first list_instance request. Then switch to a sub-account, the first account's next token would be sent to the second account list_instance api call.

Expected Behavior

We can see sub-account instances listed.

Current Behavior

Lambda Unknown exception.

Reproduction Steps

  1. Make sure you have more than 50 instances in main account
  2. Create instance group
  3. Switch account
  4. See if you can see sub-account instances

Possible Solution

Remove next token in the api request if we switch AWS account.

Additional Information/Context

No response

Solution Version

2.1.2

AWS Region. e.g., us-east-1

No response

Other information

No response