我正在运行以下命令
aws ec2 run-instances --image-id ${Ami_id} --count 1 --instance-type t2.micro --iam-instance-profile Name="bot_syndication_cloudwatch" --key-name my-key\
--security-group-ids sg-27b53b5c,sg-7ddd5306 --subnet-id subnet-96e0d6e0 \
--tag-specifications ResourceType=instance,Tags=[{Key=Name,Value=Stage-Content-Syndication},{Key=Environment,Value=Stage},{Key=Platform,Value=Windows}]\
--block-device-mappings "[{\"DeviceName\":\"/dev/sdj\",\"NoDevice\":\"\"}]" \
我收到此错误
sg-7ddd5306, --tag-specifications, ResourceType=instance,Tags=[{Key=Name,Value=Stage-Content-Syndication},{Key=Environment,Value=Stage},{Key=Platform,Value=Windows}]--block-device-mappings, [{"DeviceName":"/dev/sdj","NoDevice":""}], sg-27b53b5c
Build step 'Execute shell' marked build as failure
答案 0 :(得分:0)
问题在于此参数--security-group-ids sg-27b53b5c,sg-7ddd5306
如果要在ec2实例上分配多个安全组,则需要使用
等空格分隔--security-group-ids sg-27b53b5c sg-7ddd5306