iann0036 / AWSConsoleRecorder

Records actions made in the AWS Management Console and outputs the equivalent CLI/SDK commands and CloudFormation/Terraform templates.
MIT License
1.43k stars 86 forks source link

AWS GovCloud Support #39

Closed dhdersch closed 5 years ago

dhdersch commented 5 years ago

Problem The recorder does not appear to work in GovCloud.

Solution I would benefit from the solution working in GovCloud.

Alternatives None

iann0036 commented 5 years ago

Hi Daniel,

I don't have access to GovCloud myself so it's hard to implement. Do you have the URLs you access GovCloud with, and possibly the URLs a service typically uses to perform actions (via AJAX)?

dhdersch commented 5 years ago

I do have access. I'll look into it.

dhdersch commented 5 years ago

@iann0036 The console URL is as follows: https://console.amazonaws-us-gov.com

For an s3 PutObject Command, the URL would look something like this:

https://s3.us-gov-west-1.amazonaws.com/bucket-name/key

Let me know if there is anything else you'd be interested in seeing!

iann0036 commented 5 years ago

Hi Daniel,

I've added what I hope will be enough to support the GovCloud console. Should be in as of 0.3.25.

Could you test this out and let me know?

dhdersch commented 5 years ago

@iann0036 It seems to work now for the most part. The only issue is that the region is set to us-east-1 even though the region should be us-gov-west-1. That isn't too big of a deal to me though.

Thank-you so much!

iann0036 commented 5 years ago

Cheers for confirming @dhdersch.

Is there anything in the console URL that determines us-gov-east-1 vs. us-gov-west-1?

dhdersch commented 5 years ago

The US Gov West Console URL: https://console.amazonaws-us-gov.com

The US Gv East Console URL: https://us-gov-east-1.console.amazonaws-us-gov.com

iann0036 commented 5 years ago

Thanks again Daniel,

Hopefully the region should be shown correctly as of 0.3.26. If there's any issues, feel free to reopen.