AWS Migration JSON Error

0 votes

While working on AWS Migration i am getting below error :-
"This policy contains the following error: Missing required field Action For more information about the IAM policy grammar, seeAWS IAM Policies

I think something is missing like -- Action in code. Can someone help me with the correct code?

Here is my Code.
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:getBucketLocation",
                "s3:getBucketObject",
                "s3:listBucket"
                ],
            "Resource" : [
                "arn:aws::::vmimportdemo",
                "arn:aws::::vmimportdemo/*"
            ]
        },
        {
            "Effect": "Allow",
            "Resource" : [
                "arn:aws::::vmimportdemo",
                "arn:aws::::vmimportdemo/*"
                ]
        },
        {
           "Effect": "Allow",
            "Action": [
                "ec2:modifySnapshotAttribute",
                "ec2:CopySnapshot",
                "ec2:RegisterImage",
                "ec2:Describe*"
                ],
            "Resource" : "*"
        }
        ]
}

Dec 28, 2018 in AWS by Sradha
• 1,760 points
384 views

1 answer to this question.

0 votes

You can use the code below:

{

    "Version": "2012-10-17",

    "Statement": [

        {

            "Effect": "Allow",

            "Action": [

                "s3:getBucketLocation",

                "s3:getBucketObject",

                "s3:listBucket"

                ],

            "Resource" : [

                "arn:aws::::vmimportdemo",

                "arn:aws::::vmimportdemo/*"

            ]

        },

        {

           "Effect": "Allow",

            "Action": [

                "ec2:modifySnapshotAttribute",

                "ec2:CopySnapshot",

                "ec2:RegisterImage",

                "ec2:Describe*"

                ],

            "Resource" : "*"

        }

        ]

}
answered Dec 28, 2018 by Sujata

Related Questions In AWS

0 votes
1 answer

AWS Cloudtrail API for Go SDK showing an error mesage.

You  must add S3 Policy in your ...READ MORE

answered Jun 27, 2018 in AWS by Flying geek
• 3,280 points
1,021 views
0 votes
1 answer

A strange spark ERROR on AWS EMR

Those warning messages can be suppressed by ...READ MORE

answered Jul 13, 2018 in AWS by Flying geek
• 3,280 points
1,444 views
0 votes
1 answer

AWS S3 CLI : error while trying to copy files locally using terminal

For the first error you should add ...READ MORE

answered Aug 3, 2018 in AWS by Archana
• 4,170 points
10,623 views
0 votes
1 answer
+1 vote
2 answers
0 votes
2 answers

Error : No supported authentication methods available on AWS

Diff from other answers above: I received this ...READ MORE

answered Mar 25, 2019 in AWS by Bathinda
• 140 points
31,528 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP