2 Answers
- Newest
- Most votes
- Most comments
0
- File location is correct
- File contained HostedZoneID for LightSail Container, NOT Route53 HostedZoneID
- Ran command with 3 slashes '///'
In all cases, exactly the same error. Is appears the CLI is not able to find/read the file.
I also created a container in LightSail, but it says it is not deployed.
I tried to execute a command in the CLI:
aws route53 get-hosted-zone --id Zxxxxxxxxxxxxxxxx
And got the following error:
An error occurred (AccessDenied) when calling the GetHostedZone operation: User: arn:aws:sts::315206734695:assumed-role/AmazonLightsailInstanceRole/i-0a84f72f05a978510 is not authorized to access this resource
answered 3 years ago
0
Hello
Here are my assumptions for the issue:
- Check the file is present in that path
- Please check the path of the file.json from your system, Create file file on the sample location where you are running the command for Example:
aws route53 change-resource-record-sets --hosted-zone-id ZXXXXXXXXXX --change-batch file://file.json
- or run in this way see three slashes after the **file:/// **
aws route53 change-resource-record-sets --hosted-zone-id Z3L101LY62BTDZ --change-batch file:///Users/YOURUSER/Documents/XXXX/XXX/file.json
- Please check the HostesZone ID of the Service "HostedZoneId": "LightsailContainerServiceHostedZoneID THIS IS NOT ROUTE53 is hotedzone ID
Check the json file in more detailed way so that you will be clear: Information link
{
"Comment": "Creating the alias record for the domain",
"Changes": [
{
"Action": "CREATE",
"ResourceRecordSet":
{
"Name": "lightsail.example.com.",
"Type": "A",
"AliasTarget": {
"HostedZoneId": "LightsailContainerServiceHostedZoneID",
"DNSName": " LightsailContainerServiceAddress.",
"EvaluateTargetHealth": true
}
}
}
]
}
Relevant content
- asked 2 years ago
- asked 2 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
Are you running the CLI commands from your personal machine or on your Lightsail instance (the output above looks like it's the instance). Run the commands from your personal machine if you haven't already.