Can't Configure Route53 for LightSail (Wordpress Site)

0

I have followed the prescribed procedure to configure Route53 to make our site live.

I created a .json file with the required information:

  • LightsailContainerServiceHostedZoneID
  • hosted zone ID
  • PathToJsonFile

However, I am stuck when trying to execute the following commend :

aws route53 change-resource-record-sets --hosted-zone-id XXXXXXXXXXXXXX --change-batch file:///{User}/Downloads/Route53/change-resource-record-sets.json

I get the same errors:

  • Error parsing parameter '--change-batch': Unable to load paramfile file:///{User}/Downloads/Route53/change-resource-record-sets.json: [Errno 2] No such file or directory: '/{User}/Downloads/Route53/change-resource-record-sets.json'

Local Machine is MacOS. Could be just my ignorance to find the correct local path.

2 個答案
0
  1. File location is correct
  2. File contained HostedZoneID for LightSail Container, NOT Route53 HostedZoneID
  3. 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

已回答 2 年前
  • 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.

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
                                } 
                     }
        }
    ]
}
profile picture
GK
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南