# Route 53 setup in Virtualmin: "AWS credentials are not valid"

**URL:** <https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337>\
**Category:** Help! (Home for newbies)\
**Created:** [December 30, 2024, 10:13pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337 "2024-12-30T22:13:07Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [December 30, 2024, 10:13pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/1 "2024-12-30T22:13:07Z")

</div>

| SYSTEM INFORMATION | |
| --- | --- |
| OS type and version | Rocky Linux 9.5 |
| Virtualmin version | 7.30.3 Pro |

I am attempting to set up Route 53 in my Virtualmin. I added the AWS service to my server, and the option is now appearing under Addresses and Networking \> Cloud DNS Providers.

I created a user in my AWS account called “Virtualmin” and gave it the “AmazonRoute53FullAccess” role. I then created the keys for the account.

When I add the account to the Route 53 settings in Virtualmin, I get the error:

```auto
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.

```

I went back and added additional roles to the account in AWS, but the error is persisting. I did verify I copied the name and password from AWS correctly, and re-copied them from the downloaded CSV file.

Any advice on what next steps I can take to troubleshoot this? I did search for solutions, but nothing came up that I haven’t already tried.

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [December 30, 2024, 10:22pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/2 "2024-12-30T22:22:28Z")

</div>

I don’t see any evidence the problem is permissions (at least not yet). It looks like the credentials are wrong, based on the error.

The error would say something about access rights if that’s the problem.

---

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [December 30, 2024, 10:53pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/3 "2024-12-30T22:53:08Z")

</div>

Hm. I deleted the user, and created a new one. Added to the group with the permissions, then created a new set of Access Keys.

Copied the keys right from the portal, using the Copy icon next to each item, pasted into Virtualmin’s UI.

Unfortunately, the issue is persisting.

Is there some underlying config I may need to set up, after installing AWS on my server, but before entering the credentials? Does the AWS account need a specific role or setup aside from the permissions to modify Route53 items?

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [December 31, 2024, 12:10am UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/4 "2024-12-31T00:10:58Z")

</div>

Like Joe said its error with credentials.  
Credentials are **S3 access key** and **S3 secret key** not a account name, so Account name is not used anywhere on Virtuamin side.  
I’ll paste what I have in my IAM, you might see something different.

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/3X/b/d/bd39cfcbde5b257e786b4c156ef518155299df9c.png)

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/3X/5/8/5850f747720be75b3254c8e1b1e2a82c0bdcffc6.png)

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/3X/a/0/a03edf40b40f6a6972c146659b5b191c3fea0a39.png)

---

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [December 31, 2024, 3:27pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/5 "2024-12-31T15:27:22Z")

</div>

I did follow that post. Here’s my User setup:

 ![Screenshot 2024-12-31 102330](https://cdn.forum.virtualmin.com/uploads/default/original/3X/8/a/8ae187c5435cdf3f83ea06b73b71c04719a4824b.png)

Even when I copy & paste the two keys, either from the website or from the CSV file, I get the same error message.

---

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [December 31, 2024, 6:09pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/6 "2024-12-31T18:09:09Z")

</div>

I think I am missing an Account ID in my setup - the Virtualmin UI doesn’t ask for an Account ID anywhere, but the Web UI for AWS does before you can even get to the login page.

I’ll go over the AWS CLI setup, see what I potentially missed during the install process.

---

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [December 31, 2024, 6:29pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/7 "2024-12-31T18:29:19Z")

</div>

Even after setting up the configuration from the CLI following:

> **[Setting up the AWS CLI - AWS Command Line Interface](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-quickstart.html)**
>
> Learn how to quickly configure basic settings that the AWS Command Line Interface uses to interact with your resources on AWS services.

I still can’t connect. I set up for IAM Role - should I be using another setup method?

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [December 31, 2024, 9:40pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/8 "2024-12-31T21:40:29Z")

</div>

Only difference I see, I attach directly rather via a group.

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/3X/9/1/91c403539258ef1b415495dd11b50082667c570d.png)

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [December 31, 2024, 9:44pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/9 "2024-12-31T21:44:35Z")

</div>

> [@GJSchaller](#):
>
> the Virtualmin UI doesn’t ask for an Account ID anywhere, but the Web UI for AWS does before you can even get to the login page.

I’ve never used a Account ID in Virtuamin.

All I need to setup the S3 Account.

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/3X/d/2/d20c86e8bd9612498e69fcfa2744319650253609.png)

---

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [December 31, 2024, 10:02pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/10 "2024-12-31T22:02:12Z")

</div>

When I am creating an Access Key, what Use Case should I be picking?

 ![Screenshot 2024-12-31 170141](https://cdn.forum.virtualmin.com/uploads/default/original/3X/d/8/d8756e3df4c104087fa3f2fee45cddc522cfb700.png)

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [December 31, 2024, 10:10pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/11 "2024-12-31T22:10:52Z")

</div>

I can’t even remember that screen, second last maybe? Application Outside AWS. Although I think Virtuamin uses the CLI commands.

Looking at the error, are you selecting a zone?  
Maybe thats the issue.

---

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [December 31, 2024, 10:23pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/12 "2024-12-31T22:23:15Z")

</div>

I’m selecting us-east-1, as us-east-2 is not available in the drop-down.

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [December 31, 2024, 10:25pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/13 "2024-12-31T22:25:00Z")

</div>

I never use the drop-down, have you tried default?

---

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [December 31, 2024, 10:26pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/14 "2024-12-31T22:26:51Z")

</div>

The default is us-east-1, which I have been using.

 ![Screenshot 2024-12-31 172636](https://cdn.forum.virtualmin.com/uploads/default/original/3X/9/3/93bc54bd6609fbf95fd3e28771c92ec7f30933e7.png)

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [December 31, 2024, 10:28pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/15 "2024-12-31T22:28:44Z")

</div>

Really, let me try that zone, I’m enable there I am pretty sure.

Yeah created with new key, got me why your having issues.

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/3X/a/f/af037a80f0673f3b07bba8e6e359d980b6cd0dad.png)

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/3X/0/8/08be9b0a95d29d542e6cb6839a97e1ff97a90b63.png)

and your enabled there at aws

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/3X/8/d/8df73f7fb91976195b45cde8e510b5479e8e3a59.png)

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [December 31, 2024, 11:08pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/16 "2024-12-31T23:08:57Z")

</div>

Just pick CLI. I don’t know why there are all the different options, but Virtualmin uses the `aws-cli` command.

---

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [December 31, 2024, 11:10pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/17 "2024-12-31T23:10:37Z")

</div>

The thing that’s making me think is the line “(InvalidClientTokenId)” - I feel like something isn’t being passed to AWS correctly? Or it’s not set up correctly, but I am not sure what I am missing in my setup.

I also tried setting up an Access Key as my root user - same issue. I removed the key as soon as I tested it and it stopped working.

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [December 31, 2024, 11:36pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/18 "2024-12-31T23:36:13Z")

</div>

this may or may not help

> **[How to fix aws InvalidClientTokenId: The security token included in the...](https://blog.leapp.cloud/how-to-fix-aws-invalidclienttokenid-the-security-token-included-in-the-request-is-invalid?form=MG0AV3)**
>
> An error occurred (InvalidClientTokenId) when calling the GetCallerIdentity operation: The security token included in the request is invalid.

---

<div class="post-metadata">

**Author:** ![stefan1959](https://cdn.forum.virtualmin.com/letter_avatar_proxy/v4/letter/s/49beb7/32.png) [@stefan1959](https://forum.virtualmin.com/u/stefan1959)\
**Post date:** [January 1, 2025, 1:03am UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/19 "2025-01-01T01:03:06Z")

</div>

> [@GJSchaller](#):
>
> `Failed to save cloud DNS provider`

Ok, I just notice something, I didn’t use the `Cloud DNS provider` section in Virtualmin.  
I created the S3 Account section in the Backup and Restore section.

Can you create a account there or do you still get the error.

 ![image](https://cdn.forum.virtualmin.com/uploads/default/original/3X/3/e/3e8cce08a31c162d2c7d35cf590fbbb88494ab9c.png)

That account let me use the Route53.

P.S. Just tested, I can create a account there ☹ not the problem.

---

<div class="post-metadata">

**Author:** ![GJSchaller](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/gjschaller/32/8901_2.png) [@GJSchaller](https://forum.virtualmin.com/u/GJSchaller)\
**Post date:** [January 4, 2025, 4:35pm UTC](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337/20 "2025-01-04T16:35:19Z")

</div>

I took a step back and tried testing it from the command line. It looks like there’s a permissions issue (AssumeRole) that I need to resolve in AWS with the account I set up, before I can get the UI to work. Once I can confirm I can make calls from the command line on my server and get responses, I’ll come back and try the UI again.

> <https://stackoverflow.com/questions/79329191/virtualmin-route53-and-assumerole-error-when-managing-dns-from-cli>

[Next page](https://forum.virtualmin.com/t/route-53-setup-in-virtualmin-aws-credentials-are-not-valid/131337.md?page=2)
