{"action":"created","issue":{"url":"https://api.github.com/repos/chef/chef-provisioning-aws/issues/306","labels_url":"https://api.github.com/repos/chef/chef-provisioning-aws/issues/306/labels{/name}","comments_url":"https://api.github.com/repos/chef/chef-provisioning-aws/issues/306/comments","events_url":"https://api.github.com/repos/chef/chef-provisioning-aws/issues/306/events","html_url":"https://github.com/chef/chef-provisioning-aws/issues/306","id":104148487,"number":306,"title":"machine_batch should batch requests","user":{"login":"tyler-ball","id":2481463,"avatar_url":"https://avatars.githubusercontent.com/u/2481463?v=3","gravatar_id":"","url":"https://api.github.com/users/tyler-ball","html_url":"https://github.com/tyler-ball","followers_url":"https://api.github.com/users/tyler-ball/followers","following_url":"https://api.github.com/users/tyler-ball/following{/other_user}","gists_url":"https://api.github.com/users/tyler-ball/gists{/gist_id}","starred_url":"https://api.github.com/users/tyler-ball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tyler-ball/subscriptions","organizations_url":"https://api.github.com/users/tyler-ball/orgs","repos_url":"https://api.github.com/users/tyler-ball/repos","events_url":"https://api.github.com/users/tyler-ball/events{/privacy}","received_events_url":"https://api.github.com/users/tyler-ball/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chef/chef-provisioning-aws/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/chef/chef-provisioning-aws/labels/Improvement","name":"Improvement","color":"009800"},{"url":"https://api.github.com/repos/chef/chef-provisioning-aws/labels/Q3%20Target%20Conditions","name":"Q3 Target Conditions","color":"5319e7"},{"url":"https://api.github.com/repos/chef/chef-provisioning-aws/labels/Triaged","name":"Triaged","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-31T22:45:35Z","updated_at":"2015-08-31T22:51:48Z","closed_at":null,"body":"If a user has a recipe containing the following:\r\n\r\n```ruby\r\nmachine_batch \"apache cluster\" do\r\n  (1..10).each do |i|\r\n    machine \"apache_#{i}\" do\r\n      machine_options #...\r\n      run_list [\"recipe[apache]\"]\r\n    end\r\n  end\r\nend\r\n```\r\n\r\nWe should be only be making 1 request to AWS to create all 10 machines.  With the AWS SDK V2 we can set a [`min_count` and `max_count`](https://github.com/chef/chef-provisioning-aws/blob/64e23b6acae83a0417f06795b6c4b8812635e71a/lib/chef/provisioning/aws_driver/driver.rb#L678) parameter on the `create_instances` call.  "},"comment":{"url":"https://api.github.com/repos/chef/chef-provisioning-aws/issues/comments/136521234","html_url":"https://github.com/chef/chef-provisioning-aws/issues/306#issuecomment-136521234","issue_url":"https://api.github.com/repos/chef/chef-provisioning-aws/issues/306","id":136521234,"user":{"login":"charlesjohnson","id":541978,"avatar_url":"https://avatars.githubusercontent.com/u/541978?v=3","gravatar_id":"","url":"https://api.github.com/users/charlesjohnson","html_url":"https://github.com/charlesjohnson","followers_url":"https://api.github.com/users/charlesjohnson/followers","following_url":"https://api.github.com/users/charlesjohnson/following{/other_user}","gists_url":"https://api.github.com/users/charlesjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/charlesjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlesjohnson/subscriptions","organizations_url":"https://api.github.com/users/charlesjohnson/orgs","repos_url":"https://api.github.com/users/charlesjohnson/repos","events_url":"https://api.github.com/users/charlesjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/charlesjohnson/received_events","type":"User","site_admin":false},"created_at":"2015-08-31T22:51:48Z","updated_at":"2015-08-31T22:51:48Z","body":"See also #17, #227 "}}