Skip to content

Instantly share code, notes, and snippets.

AWS Access Key ID [None]: XXXXXXXXXX
AWS Secret Access Key [None]: XXXXXXX
Default region name [None]: us-west-2
Default output format [None]: json
aws ec2 import-instance datasciencevm.vmdk -f vmdk -t m3.xlarge -a x86_64 -b capstone123-bucket -o KKK -w SSS -p Linux
#where KKK and SSS should be replaced by the key and secret of your amazon account.
{
"ImportImageTasks": [
{
"Status": "completed",
"LicenseType": "BYOL",
"Description": "Ubuntu OVA",
"ImageId": "ami-bdeb13dd",
"Platform": "Linux",
"Architecture": "x86_64",
"SnapshotDetails": [
{
"ImportImageTasks": [
{
"Status": "completed",
"LicenseType": "BYOL",
"Description": "Ubuntu OVA",
"ImageId": "ami-bdeb13dd",
"Platform": "Linux",
"Architecture": "x86_64",
"SnapshotDetails": [
[{
"Description": "First CLI task",
"Format": "ova",
"UserBucket": {
"S3Bucket": "my-import-bucket",
"S3Key": "datasciencevm.ova"
}
}]
aws iam put-role-policy --role-name vmimport --policy-name vmimport --policy-document file://role-policy.json
{
"Version":"2012-10-17",
"Statement":[
{
"Effect":"Allow",
"Action":[
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource":[
aws iam create-role --role-name vmimport --assume-role-policy-document file://trust-policy.json
{
"Version":"2012-10-17",
"Statement":[
{
"Sid":"",
"Effect":"Allow",
"Principal":{
"Service":"vmie.amazonaws.com"
},
"Action":"sts:AssumeRole",
ssh -i "XXXX.pem" vagrant@XXXXX.compute.amazonaws.com