title: AWS Can't create Elastic beanstalk Node.js Worker using awscli
body: <p>I want to create a elastic beanstalk worker tier instance using aws CLI commands and I am getting below error. </p>
  
  <pre><code>[Instance: i-d848c050] Command failed on instance. Return code: 1 Output: missing required parameter params[:table_name] - (ArgumentError). Hook /opt/elasticbeanstalk/addons/sqsd/hooks/firstboot/02-start-sqsd.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
  </code></pre>
  
  <p>And In /var/log/eb-activity.log</p>
  
  <pre><code>init: missing required parameter params[:table_name] (ArgumentError)
  at /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/param_validator.rb:26:in `validate!'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/param_validator.rb:11:in `validate!'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/plugins/param_validator.rb:20:in `call'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.1.23/lib/seahorse/client/plugins/raise_response_errors.rb:14:in `call'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/plugins/dynamodb_simple_attributes.rb:112:in `call'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.1.23/lib/aws-sdk-core/plugins/param_converter.rb:21:in `call'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.1.23/lib/seahorse/client/plugins/response_target.rb:21:in `call'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.1.23/lib/seahorse/client/request.rb:70:in `send_request'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.1.23/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/vendor/AWSMACLE/lib/leader_election/storage_manager.rb:81:in `update_registration'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/vendor/AWSMACLE/lib/leader_election/storage_manager.rb:19:in `verify_table'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/vendor/AWSMACLE/lib/leader_election/daemon.rb:37:in `initialize'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/vendor/AWSMACLE/lib/leader_election.rb:8:in `new'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/vendor/AWSMACLE/lib/leader_election.rb:8:in `create'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/lib/aws-sqsd/cron.rb:241:in `leader_election_daemon'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/lib/aws-sqsd/cron.rb:30:in `initialize'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/lib/aws-sqsd/daemon.rb:44:in `new'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/lib/aws-sqsd/daemon.rb:44:in `initialize'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/bin/aws-sqsd:34:in `new'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/bin/aws-sqsd:34:in `start'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/bin/aws-sqsd:83:in `launch'
  from /opt/elasticbeanstalk/lib/ruby/lib/ruby/gems/2.2.0/gems/aws-sqsd-2.0/bin/aws-sqsd:111:in `&lt;top (required)&gt;'
  from /opt/elasticbeanstalk/lib/ruby/bin/aws-sqsd:23:in `load'
  from /opt/elasticbeanstalk/lib/ruby/bin/aws-sqsd:23:in `&lt;main&gt;'
  </code></pre>
  
  <p>Below are my commands which I am running in powershell script file.</p>
  
  <pre><code>#Cretae an application
  aws elasticbeanstalk create-application --application-name sample-ebs-app
  
  aws elasticbeanstalk check-dns-availability --cname-prefix sample-ebs-cname
  
  aws elasticbeanstalk describe-application-versions --application-name sample-ebs-app --version-label v1
  
  aws elasticbeanstalk create-configuration-template --application-name sample-ebs-app --template-name v1 --solution-stack-name  "64bit Amazon Linux 2015.09 v2.0.6 running Node.js"
  
  aws elasticbeanstalk create-environment --application-name sample-ebs-app --template-name v1 --environment-name sample-ebs-env --tier file://ebs-tier.json --option-settings file://ebs-options.json
  </code></pre>
  
  <p>Below is the ebs-tier.json</p>
  
  <pre><code>{
  "Version": " ",
  "Type": "SQS/HTTP",
  "Name": "Worker"
  }
  </code></pre>
  
  <p>And ebs-options.json</p>
  
  <pre><code>[
   {
      "OptionName": "Availability Zones", 
      "Namespace": "aws:autoscaling:asg", 
      "Value": "any"
  }, 
  {
      "OptionName": "Cooldown", 
      "Namespace": "aws:autoscaling:asg", 
      "Value": "360"
  }, 
  {
      "OptionName": "MaxSize", 
      "Namespace": "aws:autoscaling:asg", 
      "Value": "10"
  }, 
  {
      "OptionName": "MinSize", 
      "Namespace": "aws:autoscaling:asg", 
      "Value": "1"
  }, 
  {
      "OptionName": "BlockDeviceMappings", 
      "Namespace": "aws:autoscaling:launchconfiguration"
  }, 
  {
      "OptionName": "EC2KeyName", 
      "Namespace": "aws:autoscaling:launchconfiguration", 
      "Value": ""
  }, 
  {
      "OptionName": "IamInstanceProfile", 
      "Namespace": "aws:autoscaling:launchconfiguration", 
      "Value": "aws-elasticbeanstalk-ec2-role"
  }, 
  {
      "OptionName": "InstanceType", 
      "Namespace": "aws:autoscaling:launchconfiguration", 
      "Value": "t1.micro"
  }, 
  {
      "OptionName": "EnvironmentType", 
      "Namespace": "aws:elasticbeanstalk:environment", 
      "Value": "LoadBalanced"
  }]
  </code></pre>