我尝试使用以下命令在 Bean stalk 上更新配置模板的配置设置,例如“Beta 配置”,但它抛出错误 -
C:\Users\anand\Desktop> elastic-beanstalk-update-configuration-template -a "Application XYZ" -t Beta Configuration -d New Beta Configuration -s 32bit Amazon Linux running Tomcat 7 -f options.txt
options.txt 中的设置是 -
<pre>{"ApplicationName"=>"Application XYZ", "DateCreated"=>1314430489.771, "DateUpd
ated"=>1314430489.771, "DeploymentStatus"=>nil, "Description"=>"", "EnvironmentN
ame"=>nil, "OptionSettings"=>[{"Namespace"=>"aws:elasticbeanstalk:sns:topics", "
OptionName"=>"Notification Topic Name", "Value"=>""}, {"Namespace"=>"aws:autosca
ling:trigger", "OptionName"=>"BreachDuration", "Value"=>"5"}, {"Namespace"=>"aws
:autoscaling:trigger", "OptionName"=>"LowerBreachScaleIncrement", "Value"=>"-1"}
, {"Namespace"=>"aws:elasticbeanstalk:application:environment", "OptionName"=>"A
WS_ACCESS_KEY_ID", "Value"=>""}, {"Namespace"=>"aws:elb:healthcheck", "OptionNam
e"=>"UnhealthyThreshold", "Value"=>"5"}, {"Namespace"=>"aws:elasticbeanstalk:app
lication:environment", "OptionName"=>"AWS_SECRET_KEY", "Value"=>""}, {"Namespace
"=>"aws:autoscaling:trigger", "OptionName"=>"LowerThreshold", "Value"=>"10"}, {"
Namespace"=>"aws:elasticbeanstalk:sns:topics", "OptionName"=>"Notification Endpo
int", "Value"=>"sanand@indavest.com"}, {"Namespace"=>"aws:autoscaling:launchco
nfiguration", "OptionName"=>"SecurityGroups", "Value"=>"elasticbeanstalk-default
, default, GSUI-Base"}, {"Namespace"=>"aws:elb:loadbalancer", "OptionName"=>"SSL
CertificateId", "Value"=>""}, {"Namespace"=>"aws:elasticbeanstalk:application:en
vironment", "OptionName"=>"PARAM5", "Value"=>""}, {"Namespace"=>"aws:elasticbean
stalk:application:environment", "OptionName"=>"JDBC_CONNECTION_STRING", "Value"=
>""}, {"Namespace"=>"aws:elb:healthcheck", "OptionName"=>"Timeout", "Value"=>"5"
}, {"Namespace"=>"aws:autoscaling:asg", "OptionName"=>"Cooldown", "Value"=>"360"
}, {"Namespace"=>"aws:autoscaling:asg", "OptionName"=>"Custom Availability Zones
", "Value"=>""}, {"Namespace"=>"aws:elasticbeanstalk:monitoring", "OptionName"=>
"Automatically Terminate Unhealthy Instances", "Value"=>"true"}, {"Namespace"=>"
aws:elasticbeanstalk:container:tomcat:jvmoptions", "OptionName"=>"XX:MaxPermSize
", "Value"=>"512m"}, {"Namespace"=>"aws:autoscaling:trigger", "OptionName"=>"Uni
t", "Value"=>"Percent"}, {"Namespace"=>"aws:elasticbeanstalk:container:tomcat:jv
moptions", "OptionName"=>"Xmx", "Value"=>"512m"}, {"Namespace"=>"aws:elasticbean
stalk:application", "OptionName"=>"Application Healthcheck URL", "Value"=>"/"},
{"Namespace"=>"aws:autoscaling:asg", "OptionName"=>"Availability Zones", "Value"
=>"Any 1"}, {"Namespace"=>"aws:elasticbeanstalk:sns:topics", "OptionName"=>"Noti
fication Topic ARN", "Value"=>""}, {"Namespace"=>"aws:elasticbeanstalk:container
:tomcat:jvmoptions", "OptionName"=>"JVM Options", "Value"=>"-Duser.timezone=Amer
ica/New_York"}, {"Namespace"=>"aws:elasticbeanstalk:application:environment", "O
ptionName"=>"PARAM1", "Value"=>""}, {"Namespace"=>"aws:elb:loadbalancer", "Optio
nName"=>"LoadBalancerHTTPSPort", "Value"=>"OFF"}, {"Namespace"=>"aws:elb:healthc
heck", "OptionName"=>"Interval", "Value"=>"30"}, {"Namespace"=>"aws:autoscaling:
trigger", "OptionName"=>"UpperBreachScaleIncrement", "Value"=>"1"}, {"Namespace"
=>"aws:autoscaling:trigger", "OptionName"=>"UpperThreshold", "Value"=>"70"}, {"N
amespace"=>"aws:autoscaling:launchconfiguration", "OptionName"=>"ImageId", "Valu
e"=>"ami-847xv6ea"}, {"Namespace"=>"aws:autoscaling:asg", "OptionName"=>"MinSize
", "Value"=>"1"}, {"Namespace"=>"aws:elasticbeanstalk:sns:topics", "OptionName"=
>"Notification Protocol", "Value"=>"email"}, {"Namespace"=>"aws:elasticbeanstalk
:hostmanager", "OptionName"=>"LogPublicationControl", "Value"=>"true"}, {"Namesp
ace"=>"aws:autoscaling:launchconfiguration", "OptionName"=>"MonitoringInterval",
"Value"=>"5 minute"}, {"Namespace"=>"aws:elasticbeanstalk:application:environme
nt", "OptionName"=>"PARAM2", "Value"=>""}, {"Namespace"=>"aws:elb:policies", "Op
tionName"=>"Stickiness Cookie Expiration", "Value"=>"0"}, {"Namespace"=>"aws:elb
:healthcheck", "OptionName"=>"HealthyThreshold", "Value"=>"3"}, {"Namespace"=>"a
ws:elasticbeanstalk:application:environment", "OptionName"=>"PARAM4", "Value"=>"
"}, {"Namespace"=>"aws:elb:policies", "OptionName"=>"Stickiness Policy", "Value"
=>"true"}, {"Namespace"=>"aws:autoscaling:trigger", "OptionName"=>"Statistic", "
Value"=>"Average"}, {"Namespace"=>"aws:autoscaling:trigger", "OptionName"=>"Meas
ureName", "Value"=>"CPUUtilization"}, {"Namespace"=>"aws:elasticbeanstalk:applic
ation:environment", "OptionName"=>"PARAM3", "Value"=>""}, {"Namespace"=>"aws:aut
oscaling:launchconfiguration", "OptionName"=>"EC2KeyName", "Value"=>"indavest"},
{"Namespace"=>"aws:autoscaling:asg", "OptionName"=>"MaxSize", "Value"=>"2"}, {"
Namespace"=>"aws:autoscaling:trigger", "OptionName"=>"Period", "Value"=>"5"}, {"
Namespace"=>"aws:elb:loadbalancer", "OptionName"=>"LoadBalancerHTTPPort", "Value
"=>"80"}, {"Namespace"=>"aws:autoscaling:launchconfiguration", "OptionName"=>"In
stanceType", "Value"=>"c1.medium"}, {"Namespace"=>"aws:elasticbeanstalk:containe
r:tomcat:jvmoptions", "OptionName"=>"Xms", "Value"=>"256m"}], "SolutionStackName
"=>"32bit Amazon Linux running Tomcat 7", "TemplateName"=>"Beta Configuration"}
</pre>
我得到的错误是 -
<pre>710: unexpected token at '{"ApplicationName"=>"General Sentiment", "DateCreated"
=>1314430489.771, "DateUpdated"=>1314430489.771, "DeploymentStatus"=>nil, "Description"=>"", "EnvironmentName"=>nil, "OptionSettings"=>[{"Namespace"=>"aws:elasticbeanstalk:sns:topics", " ....................................</pre>
请建议我解决此错误