'Create a TXT record in AWS by using the aws cli

When I execute this:

aws route53 list-hosted-zones

I have the following response:

{
    "HostedZones": [
        {
            "Id": "/hostedzone/Z209RXXXXXXE2L",
            "Name": "ultrasist.net.",
            "CallerReference": "ECXXXX62-EXXA-8XX9-8XX5-8E52XXXXXX81",
            "Config": {
                "Comment": "Corporate zone",
                "PrivateZone": false
            },
            "ResourceRecordSetCount": 46
        }
    ]
}

So, I am pretty sure that I have the domain "ultrasist.net". Now, if I do this:

aws \
lightsail \
create-domain-entry \
--region 'us-east-1' \
--domain-name 'ultrasist.net' \
--domain-entry '{"name":"_test-txt.ultrasist.net","target":"\"xyz\"", "isAlias":false,"type":"TXT"}'

I got this response:

An error occurred (NotFoundException) when calling the CreateDomainEntry operation: The Domain does not exist: ultrasist.net

However, as you can see, the domain DOES exist. So, my question is pretty obvious: Why Do I get this message if the domain of course is there?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source