Following up on an old thread (Here), I got this partially resolved. Prior to this, I was unable to connect to AWS from either the command line, OR from Virtualmin. Aftrer working with a local friend, we confirmed my credentials worked from his server, so it was something in my environment. We removed AWS CLI v2, and installed an older version. Now, I can connect from the command line, but still can’t connect from Virtualmin.
but when I put the same keys into Virtualmin, I get the following:
Failed to save cloud DNS provider : AWS credentials are not valid : An error occurred (InvalidClientTokenId) when calling the ListHostedZones operation: The security token included in the request is invalid.
Any guidance on how to get my credentials working from within Virtualmin? They seem to work fine from the terminal / CLI.
EDIT: This is for DNS management, under Cloud DNS Providers.
Your testing the memory now.
I just had a look at my config a the DNS cloud is not config, I may have removed it ( I can’t remember) as I just used it for testing. But I tried to add it back and I get your error. Maybe there is a bug.
I pretty sure the install was dnf install awscli
I was using the wrong Access key, added key and secret ok. (double check you not pasting a leading or ending white space) As far as I know virtualmin is using the awscli so I can’t understand why you would have this error.
So Virtualmin will setup AWS CLI credentials that can also be used when you SSH in.
Does the command aws route53 list-hosted-zones work OK?
If so, check the file /root/.aws/credentials and find the numeric profile ID for credentials Virtualmin added. Then try running aws --profile 1234566789 route53 list-hosted-zones
Did you add those using the “Virtualmin / Addresses and Networking ⇾ Cloud DNS Providers: Amazon Route 53” page? If not, give it a try and see how it goes.
Note that [akey_or_id] should be a timestamp like [17286401039020] when created via Virtualmin.
Is there a way to either 1) Tell Virtualmin to use the Default credentials / profile, or 2) Specify the profile name manually, so that it’s something I can manually enter into the Credentials file in the short term?