An error occurred (AccessDeniedException) when calling the CreateDiskSnapshot operation

0

I want to migrate my lightsail to ipv6 only instance, I following this: https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-create-an-instance-root-volume-snapshot.html, but when I run aws lightsail create-disk-snapshot --region ap-southeast-1 --instance-name bh --disk-snapshot-name backup

It shows: An error occurred (AccessDeniedException) when calling the CreateDiskSnapshot operation: User: arn:aws:sts::750876363357:assumed-role/AmazonLightsailInstanceRole/i-0d884500fa12eb433 is not authorized to perform: lightsail:CreateDiskSnapshot on resource: arn:aws:lightsail:ap-southeast-1:750876363357:* because no identity-based policy allows the lightsail:CreateDiskSnapshot action.

How to solve this?

已提問 23 天前檢視次數 192 次
9 個答案
0

Still errors, and the charging starts in May, this causes us to pay for ipv4... Please fix your system issue!

已回答 19 天前
  • Sorry to hear about the errors.

    To unblock you from being able to access the data from the root disk-snapshot on your new IPv6 instance, you could use the CLI to create a new disk and then since the Instance page on console is NOT throwing errors, do the disk attachment and other actions via the console. The command to create the disk will be:

    aws lightsail create-disk-from-snapshot --region ap-southeast-1 --disk-snapshot-name backup --disk-name <replace-with-your-desired-disk-name>  --availability-zone ap-southeast-1a --size-in-gb 20
    

    ===

    For the Snapshot page errors, could you please help check which request the console is making is failing and what error it is seeing by trying to debug using the browser Network tool as described here for Chrome - https://developer.chrome.com/docs/devtools/network ?

    If that doesn't work you could try following https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-create-har-file.html and share that har file for us to take a look. Please ensure to sanitize/remove all sensitive data from the har file before sharing via this or on any public forum or instead reach us via AWS Support under the free plan.

  • I want to create a disk for the US zone, not ap-southeast-1a, maybe that is the root cause? Because I want my new instance located in US.

  • Then you would first copy the root disk snapshot to the other region.

    aws lightsail copy-snapshot --region us-east-1 --source-region ap-southeast-1 --source-snapshot-name backup --target-snapshot-name backup-in-us
    

    And then run the create disk command as follows

    aws lightsail create-disk-from-snapshot --region us-east-1 --disk-snapshot-name backup-in-us --disk-name <replace-with-your-desired-disk-name>  --availability-zone us-east-1a --size-in-gb 20
    
0

After running that command, I saw the item on the snapshot tab, I want to create a disk for the US zone, but after submitting the create disk requirement, the Lightsail system broke..., when I click the snapshot tab, it shows

Lightsail system broke

Hmm, something's up… Lightsail is currently experiencing a problem.

We're fixing it, we promise! In the meantime, the AWS Service Health Dashboard might provide more information

已回答 23 天前
  • I checked the status of Lightsail in the Service health dashboard and it didn't appear to be at fault. https://health.aws.amazon.com/health/status
    Please try clearing your browser's cache and cookies, or accessing from a different browser or PC.

  • Yes, the Lightsail in the Service health dashboard shows nothing, but when I enter the snapshot tab, it shows as the image. The instance tab is okay. Changing the computer or cleaning the cache does nothing to this

0

Still not solved, AWS should not charge me before their system bug is solved!!!

已回答 8 天前
0

I ran those command as suggested

aws lightsail copy-snapshot --region us-east-1 --source-region ap-southeast-1 --source-snapshot-name backup --target-snapshot-name backup-in-us

{
    "operations": [
        {
            "id": "65a57876-8bd5-4324-b8fa-31bdd35c1920",
            "resourceName": "backup-in-us",
            "resourceType": "DiskSnapshot",
            "createdAt": "2024-05-12T19:15:06.741000+00:00",
            "location": {
                "availabilityZone": "all",
                "regionName": "us-east-1"
            },
            "isTerminal": false,
            "operationDetails": "ap-southeast-1:backup",
            "operationType": "CopySnapshot",
            "status": "Started",
            "statusChangedAt": "2024-05-12T19:15:06.741000+00:00"
        }
    ]
}


$ aws lightsail create-disk-from-snapshot --region us-east-1 --disk-snapshot-name backup-in-us --disk-name web-server  --availability-zone us-east-1a --size-in-gb 20
{
    "operations": [
        {
            "id": "398c282e-9d22-4089-9c9e-521399174c7f",
            "resourceName": "web-server",
            "resourceType": "Disk",
            "createdAt": "2024-05-12T19:16:42.983000+00:00",
            "location": {
                "availabilityZone": "us-east-1a",
                "regionName": "us-east-1"
            },
            "isTerminal": false,
            "operationType": "CreateDiskFromSnapshot",
            "status": "Started",
            "statusChangedAt": "2024-05-12T19:16:43.333000+00:00"
        }
    ]
}

But the Lightsail snapshot tab still shows the error snapshot error

已回答 7 天前
  • Those commands were not meant to resolve the error. But to unblock you towards creating the new IPv6-only instance and attaching the disk from your old IPv4 instance to this new instance to recover data and application. . You should now be able to use the other working pages of the console to create new IPv6-only instance in US Virginia region and attach the disk created above namely web-server to it and proceed with your further steps towards setting up your application on the new instance. . Once done, you can delete the older IPv4 instance after taking an instance-snapshot as a backup in case the new instance doesn't work out.

0

Hello.

This is because the IAM user or IAM Role you are using is not allowed to execute "lightsail:CreateDiskSnapshot".
I'm assuming you're running the AWS CLI on Lightsail from the message "User: arn:aws:sts::750876363357:assumed-role/AmazonLightsailInstanceRole/i-0d884500fa12eb433", but try using CloudShell.
If you use CloudShell, the IAM policy of the IAM user you are using is used, so if the IAM user has permission to execute "lightsail:CreateDiskSnapshot", you can create a snapshot.
https://docs.aws.amazon.com/cloudshell/latest/userguide/welcome.html

profile picture
專家
已回答 23 天前
profile pictureAWS
專家
已審閱 23 天前
0

Hi,

You appear to be running the command from a Lightsail instance without specifying an AWS profile identifier or providing any explicit AWS credentials. This makes it use the default instance profile to run the command and this profile does not have the required permissions.

You have a few options as alternatives:

  1. Use AWS CloudShell via the Lightsail console to run your command instead. Please refer this doc
  2. Continue using Lightsail instance, but set AWS credentials on the session or setup and specify an AWS profile on the command. Please refer doc1 and doc2
  3. Run the command on your laptop or some server where you have AWS credentials or profile setup

Thanks.

profile pictureAWS
專家
AWS-SUM
已回答 23 天前
0

Still error in the snapshot page Enter image description here

已回答 22 天前
0

Enter image description here Enter image description here Enter image description here Enter image description here

已回答 18 天前
0

I created a har file, but I can not find the free support plan.

Technical support is unavailable under the Basic Support Plan Upgrade your plan to gain access to AWS technical support, architectural guidance, and more.

已回答 7 天前

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

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

回答問題指南