Closed eistrati closed 7 years ago
I'd like to challenge / ask if default value for region should be 'us-east-1' or '*'. What do you guys think @mgoria @AlexanderC @ddimitrioglo ?
One more idea: Can we query Route53 based on some metadata from CloudFront or S3, in order to identify and output the CNAME or A ALIAS record, if available?
It would be cool it be "*" right after installation, but also be a command like deepify config set region='us-east-1'
to adjust for user's needs.
By cloudfront ID we can get it's aliases:
aws cloudfront get-distribution --id X88XX8XX8888XX --query "Distribution.DistributionConfig.Aliases.Items[]"
// output [ "example.com" ]
and then for each alias we can get `RecordSetCount`:
aws route53 list-hosted-zones --query="HostedZones[].{ResourceRecordSetCount: ResourceRecordSetCount, Name: Name}[?contains(Name, 'example.com')] | [0]"
// output: { "ResourceRecordSetCount": 32, "Name": "example.com." }
P.S. At least for first level domains, and at least from AWS CLI
I'm for *
as default region for listing, don't want to make any privileges for us-east-1
:)
I guess it's feasible, if it's possible from cli it should be also available in nodejs sdk
Test Passed
@eistrati I have tested all the scenarios from task description and test passed. (please refer to the screenshots above)
Please let me know if separate task should be opened for this purposes.
I would propose the following output: