Last active
August 29, 2015 14:20
-
-
Save ryo0301/8d6272b4c746eb273ab3 to your computer and use it in GitHub Desktop.
ImportImageによるVMインポート ref: http://qiita.com/ryo0301/items/e36f7602fbd762e739b2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "1", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:GetBucketLocation", | |
"s3:ListBucket" | |
], | |
"Resource": [ | |
"arn:aws:s3:::<disk-image-file-bucket>" | |
] | |
}, | |
{ | |
"Sid": "2", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:GetObject" | |
], | |
"Resource": [ | |
"arn:aws:s3:::<disk-image-file-bucket>/*" | |
] | |
}, | |
{ | |
"Sid": "3", | |
"Effect": "Allow", | |
"Action": [ | |
"ec2:CopySnapshot", | |
"ec2:ModifySnapshotAttribute", | |
"ec2:RegisterImage", | |
"ec2:Describe*", | |
], | |
"Resource": [ | |
"*" | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Status": "active", | |
"Description": "vm-import", | |
"Progress": "2", | |
"SnapshotDetails": [ | |
{ | |
"UserBucket": { | |
"S3Bucket": "<disk-image-file-bucket>", | |
"S3Key": "<path/to/vm-image.vmdk>" | |
}, | |
"DiskImageSize": 0.0 | |
} | |
], | |
"StatusMessage": "pending", | |
"ImportTaskId": "import-ami-XXXXXXXX" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ImportImageTasks": [ | |
{ | |
"Status": "active", | |
"SnapshotDetails": [ | |
{ | |
"UserBucket": { | |
"S3Bucket": "<disk-image-file-bucket>", | |
"S3Key": "<path/to/vm-image.vmdk>" | |
}, | |
"DiskImageSize": 111.....0, | |
"Format": "VMDK" | |
} | |
], | |
"Description": "vm-import", | |
"StatusMessage": "ServerError: an internal error has occurred during conversion.", | |
"ImportTaskId": "import-ami-XXXXXXXX" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ImportImageTasks": [ | |
{ | |
"Status": "completed", | |
"LicenseType": "BYOL", | |
"Description": "vm-import", | |
"ImageId": "ami-XXXXXXXX", | |
"Platform": "Linux", | |
"Architecture": "x86_64", | |
"SnapshotDetails": [ | |
{ | |
"UserBucket": { | |
"S3Bucket": "<disk-image-file-bucket>", | |
"S3Key": "<path/to/vm-image.vmdk>" | |
}, | |
"SnapshotId": "snap-XXXXXXXX", | |
"DiskImageSize": 111...., | |
"DeviceName": "/dev/sda1", | |
"Format": "VMDK" | |
} | |
], | |
"ImportTaskId": "import-ami-XXXXXXXX" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Description": "vm-import", | |
"DiskContainers": [ | |
{ | |
"UserBucket": { | |
"S3Bucket": "<disk-image-file-bucket>", | |
"S3Key": "<path/to/vm-image.vmdk>" | |
} | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "", | |
"Effect": "Allow", | |
"Principal": { | |
"Service": "vmie.amazonaws.com" | |
}, | |
"Action": "sts:AssumeRole", | |
"Condition": { | |
"StringEquals": { | |
"sts:ExternalId": "vmimport" | |
} | |
} | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "1", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:ListAllMyBuckets" | |
], | |
"Resource": [ | |
"*" | |
] | |
}, | |
{ | |
"Sid": "2", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:CreateBucket", | |
"s3:DeleteBucket", | |
"s3:GetBucketLocation", | |
"s3:ListBucket" | |
], | |
"Resource": [ | |
"arn:aws:s3:::<disk-image-file-bucket>" | |
] | |
}, | |
{ | |
"Sid": "3", | |
"Effect": "Allow", | |
"Action": [ | |
"s3:DeleteObject", | |
"s3:GetObject", | |
"s3:PutObject" | |
], | |
"Resource": [ | |
"arn:aws:s3:::<disk-image-file-bucket>/*" | |
] | |
}, | |
{ | |
"Sid": "4", | |
"Effect": "Allow", | |
"Action": [ | |
"ec2:CancelConversionTask", | |
"ec2:CancelExportTask", | |
"ec2:CreateImage", | |
"ec2:CreateInstanceExportTask", | |
"ec2:CreateTags", | |
"ec2:DeleteTags", | |
"ec2:DescribeConversionTasks", | |
"ec2:DescribeExportTasks", | |
"ec2:DescribeInstanceAttribute", | |
"ec2:DescribeInstanceStatus", | |
"ec2:DescribeInstances", | |
"ec2:DescribeTags", | |
"ec2:ImportInstance", | |
"ec2:ImportVolume", | |
"ec2:StartInstances", | |
"ec2:StopInstances", | |
"ec2:TerminateInstances", | |
"ec2:ImportImage", | |
"ec2:ImportSnapshot", | |
"ec2:DescribeImportImageTasks", | |
"ec2:DescribeImportSnapshotTasks", | |
"ec2:CancelImportTask" | |
], | |
"Resource": [ | |
"*" | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment