EC2 run-instances error: Invalid value ('Encrypted') for param element of list:BlockDeviceMappings of type...
According to the AWS CLI documentation, I can specify that a volume should be encrypted and provide the KMS Key Id accordingly. I can't make it work though... what am I doing wrong here?
aws ec2 run-instances --block-device-mappings '[ {"DeviceName": "/dev/sda1", "Ebs": { "DeleteOnTermination": true, "VolumeSize": 10, "VolumeType": "gp2" }}, {"DeviceName": "/dev/sdb1", "Ebs": { "DeleteOnTermination": false, "VolumeSize": 20, "VolumeType": "gp2", "Encrypted": true, "KmsKeyId": "f80d1a0e-9295-4ca7-8f27-2ce79fec9838" }} ]' --image-id $BASE_AMI --count 1 --instance-type $INSTANCE_TYPE --security-group-ids $SEC_GROUPS --subnet-id $SUBNET --key-name "$KEY_PAIR"
Pretty-printed JSON for block-device-mappings below for ease of reference:
[
{
"DeviceName": "/dev/sda1",
"Ebs": {
"DeleteOnTermination": true,
"VolumeSize": 10,
"VolumeType": "gp2"
}
},
{
"DeviceName": "/dev/sdb1",
"Ebs": {
"DeleteOnTermination": false,
"VolumeSize": 20,
"VolumeType": "gp2",
"Encrypted": true,
"KmsKeyId": "f80d1a0e-9295-4ca7-8f27-2ce79fec9838"
}
}
]
When I run the above command, I get the error you see in the subject line. If I swap the order of the Encrypted and KmsKeyId values around, it complains about KmsKeyId instead.
FWIW, I installed AWS CLI via apt on Ubuntu 14.04.
john@dev3:/home/john$ aws --version
aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-161-generic
amazon-web-services amazon-ec2 aws-cli
add a comment |
According to the AWS CLI documentation, I can specify that a volume should be encrypted and provide the KMS Key Id accordingly. I can't make it work though... what am I doing wrong here?
aws ec2 run-instances --block-device-mappings '[ {"DeviceName": "/dev/sda1", "Ebs": { "DeleteOnTermination": true, "VolumeSize": 10, "VolumeType": "gp2" }}, {"DeviceName": "/dev/sdb1", "Ebs": { "DeleteOnTermination": false, "VolumeSize": 20, "VolumeType": "gp2", "Encrypted": true, "KmsKeyId": "f80d1a0e-9295-4ca7-8f27-2ce79fec9838" }} ]' --image-id $BASE_AMI --count 1 --instance-type $INSTANCE_TYPE --security-group-ids $SEC_GROUPS --subnet-id $SUBNET --key-name "$KEY_PAIR"
Pretty-printed JSON for block-device-mappings below for ease of reference:
[
{
"DeviceName": "/dev/sda1",
"Ebs": {
"DeleteOnTermination": true,
"VolumeSize": 10,
"VolumeType": "gp2"
}
},
{
"DeviceName": "/dev/sdb1",
"Ebs": {
"DeleteOnTermination": false,
"VolumeSize": 20,
"VolumeType": "gp2",
"Encrypted": true,
"KmsKeyId": "f80d1a0e-9295-4ca7-8f27-2ce79fec9838"
}
}
]
When I run the above command, I get the error you see in the subject line. If I swap the order of the Encrypted and KmsKeyId values around, it complains about KmsKeyId instead.
FWIW, I installed AWS CLI via apt on Ubuntu 14.04.
john@dev3:/home/john$ aws --version
aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-161-generic
amazon-web-services amazon-ec2 aws-cli
Current version of awscli is 1.16.52. I don't think you can safely use apt-get to install awscli. I would uninstall it and follow awscli instructions to use pip or the bundled installer.
– jarmod
Nov 13 '18 at 1:39
Thanks, I'll do that. Couldn't find the current version info in the docs anywhere in my earlier search.
– John Rix
Nov 13 '18 at 1:42
I don’t think you’ll find that info in docs. May be best to rely on github.com/aws/aws-cli/releases
– jarmod
Nov 13 '18 at 1:50
Thanks @jarmod. Switching to the latest version as suggested solved the problem. Post your response as an answer so I can accept it!
– John Rix
Nov 13 '18 at 10:26
add a comment |
According to the AWS CLI documentation, I can specify that a volume should be encrypted and provide the KMS Key Id accordingly. I can't make it work though... what am I doing wrong here?
aws ec2 run-instances --block-device-mappings '[ {"DeviceName": "/dev/sda1", "Ebs": { "DeleteOnTermination": true, "VolumeSize": 10, "VolumeType": "gp2" }}, {"DeviceName": "/dev/sdb1", "Ebs": { "DeleteOnTermination": false, "VolumeSize": 20, "VolumeType": "gp2", "Encrypted": true, "KmsKeyId": "f80d1a0e-9295-4ca7-8f27-2ce79fec9838" }} ]' --image-id $BASE_AMI --count 1 --instance-type $INSTANCE_TYPE --security-group-ids $SEC_GROUPS --subnet-id $SUBNET --key-name "$KEY_PAIR"
Pretty-printed JSON for block-device-mappings below for ease of reference:
[
{
"DeviceName": "/dev/sda1",
"Ebs": {
"DeleteOnTermination": true,
"VolumeSize": 10,
"VolumeType": "gp2"
}
},
{
"DeviceName": "/dev/sdb1",
"Ebs": {
"DeleteOnTermination": false,
"VolumeSize": 20,
"VolumeType": "gp2",
"Encrypted": true,
"KmsKeyId": "f80d1a0e-9295-4ca7-8f27-2ce79fec9838"
}
}
]
When I run the above command, I get the error you see in the subject line. If I swap the order of the Encrypted and KmsKeyId values around, it complains about KmsKeyId instead.
FWIW, I installed AWS CLI via apt on Ubuntu 14.04.
john@dev3:/home/john$ aws --version
aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-161-generic
amazon-web-services amazon-ec2 aws-cli
According to the AWS CLI documentation, I can specify that a volume should be encrypted and provide the KMS Key Id accordingly. I can't make it work though... what am I doing wrong here?
aws ec2 run-instances --block-device-mappings '[ {"DeviceName": "/dev/sda1", "Ebs": { "DeleteOnTermination": true, "VolumeSize": 10, "VolumeType": "gp2" }}, {"DeviceName": "/dev/sdb1", "Ebs": { "DeleteOnTermination": false, "VolumeSize": 20, "VolumeType": "gp2", "Encrypted": true, "KmsKeyId": "f80d1a0e-9295-4ca7-8f27-2ce79fec9838" }} ]' --image-id $BASE_AMI --count 1 --instance-type $INSTANCE_TYPE --security-group-ids $SEC_GROUPS --subnet-id $SUBNET --key-name "$KEY_PAIR"
Pretty-printed JSON for block-device-mappings below for ease of reference:
[
{
"DeviceName": "/dev/sda1",
"Ebs": {
"DeleteOnTermination": true,
"VolumeSize": 10,
"VolumeType": "gp2"
}
},
{
"DeviceName": "/dev/sdb1",
"Ebs": {
"DeleteOnTermination": false,
"VolumeSize": 20,
"VolumeType": "gp2",
"Encrypted": true,
"KmsKeyId": "f80d1a0e-9295-4ca7-8f27-2ce79fec9838"
}
}
]
When I run the above command, I get the error you see in the subject line. If I swap the order of the Encrypted and KmsKeyId values around, it complains about KmsKeyId instead.
FWIW, I installed AWS CLI via apt on Ubuntu 14.04.
john@dev3:/home/john$ aws --version
aws-cli/1.2.9 Python/3.4.3 Linux/3.13.0-161-generic
amazon-web-services amazon-ec2 aws-cli
amazon-web-services amazon-ec2 aws-cli
edited Nov 13 '18 at 1:31
asked Nov 13 '18 at 1:25
John Rix
2,9832330
2,9832330
Current version of awscli is 1.16.52. I don't think you can safely use apt-get to install awscli. I would uninstall it and follow awscli instructions to use pip or the bundled installer.
– jarmod
Nov 13 '18 at 1:39
Thanks, I'll do that. Couldn't find the current version info in the docs anywhere in my earlier search.
– John Rix
Nov 13 '18 at 1:42
I don’t think you’ll find that info in docs. May be best to rely on github.com/aws/aws-cli/releases
– jarmod
Nov 13 '18 at 1:50
Thanks @jarmod. Switching to the latest version as suggested solved the problem. Post your response as an answer so I can accept it!
– John Rix
Nov 13 '18 at 10:26
add a comment |
Current version of awscli is 1.16.52. I don't think you can safely use apt-get to install awscli. I would uninstall it and follow awscli instructions to use pip or the bundled installer.
– jarmod
Nov 13 '18 at 1:39
Thanks, I'll do that. Couldn't find the current version info in the docs anywhere in my earlier search.
– John Rix
Nov 13 '18 at 1:42
I don’t think you’ll find that info in docs. May be best to rely on github.com/aws/aws-cli/releases
– jarmod
Nov 13 '18 at 1:50
Thanks @jarmod. Switching to the latest version as suggested solved the problem. Post your response as an answer so I can accept it!
– John Rix
Nov 13 '18 at 10:26
Current version of awscli is 1.16.52. I don't think you can safely use apt-get to install awscli. I would uninstall it and follow awscli instructions to use pip or the bundled installer.
– jarmod
Nov 13 '18 at 1:39
Current version of awscli is 1.16.52. I don't think you can safely use apt-get to install awscli. I would uninstall it and follow awscli instructions to use pip or the bundled installer.
– jarmod
Nov 13 '18 at 1:39
Thanks, I'll do that. Couldn't find the current version info in the docs anywhere in my earlier search.
– John Rix
Nov 13 '18 at 1:42
Thanks, I'll do that. Couldn't find the current version info in the docs anywhere in my earlier search.
– John Rix
Nov 13 '18 at 1:42
I don’t think you’ll find that info in docs. May be best to rely on github.com/aws/aws-cli/releases
– jarmod
Nov 13 '18 at 1:50
I don’t think you’ll find that info in docs. May be best to rely on github.com/aws/aws-cli/releases
– jarmod
Nov 13 '18 at 1:50
Thanks @jarmod. Switching to the latest version as suggested solved the problem. Post your response as an answer so I can accept it!
– John Rix
Nov 13 '18 at 10:26
Thanks @jarmod. Switching to the latest version as suggested solved the problem. Post your response as an answer so I can accept it!
– John Rix
Nov 13 '18 at 10:26
add a comment |
1 Answer
1
active
oldest
votes
It looks like the most recent release of awscli is 1.16.x so I would update the awscli and re-test. It's possible that this was fixed (or was unsupported in version 1.2.x, which you are running).
More generally, I don't think you can safely use apt-get to install the latest awscli on Ubuntu. I would uninstall it and follow awscli instructions for Linux to use pip or the bundled installer.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272440%2fec2-run-instances-error-invalid-value-encrypted-for-param-element-of-listb%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
It looks like the most recent release of awscli is 1.16.x so I would update the awscli and re-test. It's possible that this was fixed (or was unsupported in version 1.2.x, which you are running).
More generally, I don't think you can safely use apt-get to install the latest awscli on Ubuntu. I would uninstall it and follow awscli instructions for Linux to use pip or the bundled installer.
add a comment |
It looks like the most recent release of awscli is 1.16.x so I would update the awscli and re-test. It's possible that this was fixed (or was unsupported in version 1.2.x, which you are running).
More generally, I don't think you can safely use apt-get to install the latest awscli on Ubuntu. I would uninstall it and follow awscli instructions for Linux to use pip or the bundled installer.
add a comment |
It looks like the most recent release of awscli is 1.16.x so I would update the awscli and re-test. It's possible that this was fixed (or was unsupported in version 1.2.x, which you are running).
More generally, I don't think you can safely use apt-get to install the latest awscli on Ubuntu. I would uninstall it and follow awscli instructions for Linux to use pip or the bundled installer.
It looks like the most recent release of awscli is 1.16.x so I would update the awscli and re-test. It's possible that this was fixed (or was unsupported in version 1.2.x, which you are running).
More generally, I don't think you can safely use apt-get to install the latest awscli on Ubuntu. I would uninstall it and follow awscli instructions for Linux to use pip or the bundled installer.
answered Nov 13 '18 at 12:16
jarmod
18.4k63948
18.4k63948
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53272440%2fec2-run-instances-error-invalid-value-encrypted-for-param-element-of-listb%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Current version of awscli is 1.16.52. I don't think you can safely use apt-get to install awscli. I would uninstall it and follow awscli instructions to use pip or the bundled installer.
– jarmod
Nov 13 '18 at 1:39
Thanks, I'll do that. Couldn't find the current version info in the docs anywhere in my earlier search.
– John Rix
Nov 13 '18 at 1:42
I don’t think you’ll find that info in docs. May be best to rely on github.com/aws/aws-cli/releases
– jarmod
Nov 13 '18 at 1:50
Thanks @jarmod. Switching to the latest version as suggested solved the problem. Post your response as an answer so I can accept it!
– John Rix
Nov 13 '18 at 10:26