iann0036 / former2

Generate CloudFormation / Terraform / Troposphere templates from your existing AWS resources.
https://former2.com
MIT License
2.24k stars 270 forks source link

UnknownEndpoint exception for CLI #189

Open CodarioIO-alexey-beloglazov opened 3 years ago

CodarioIO-alexey-beloglazov commented 3 years ago

It reproduces only for us-west-1 region on my account. I provided all permissions for AWS credentials.

The command former2 generate --region=eu-central-1 --exclude-services=greengrass --output-cloudformation=/tmp/3144e19e-6cbe-4ca6-b9e8-7e60a48a9585/217096764149_eu-central-1.yml --output-raw-data=/tmp/3144e19e-6cbe-4ca6-b9e8-7e60a48a9585/217096764149_eu-central-1_debug.json --output-logical-id-mapping=/tmp/3144e19e-6cbe-4ca6-b9e8-7e60a48a9585/217096764149_eu-central-1_ids.json --sort-output --include-default-resources

There are detected 139 resources, 138 processes fine, but the last one just executes about 15 minutes and throws an exception:

Too many requests for Greengrass.listConnectorDefinitions, sleeping for 7216ms
...
Too many requests for Greengrass.listConnectorDefinitions, sleeping for 22345ms
...
Too many requests for Greengrass.listConnectorDefinitions, sleeping for 59834ms
...
UnknownEndpoint: Inaccessible host: `worklink.us-west-1.amazonaws.com' at port `undefined'. This service may not be available in the `us-west-1' region.

For other regions that work fine. I resolved that used --exclude-services=greengrass.

iann0036 commented 3 years ago

Hey @CodarioIO-alexey-beloglazov,

Thanks heaps for reporting. I've placed an allowlist for the regions for Greengrass to stop this behaviour. Should be in 0.2.59 of the CLI.

Let me know if you hit any issues though.