Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8350873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T08:27:21+00:00 2026-06-09T08:27:21+00:00

The following code is intended to add a newly deployed EC2 instance in a

  • 0

The following code is intended to add a newly deployed EC2 instance in a VPC to a load balancer. (This is pretty obviously test/dummy code, but the general workflow is the same in a real system)

require 'yaml'
gem 'aws-sdk','1.6.0'
require 'aws-sdk'

AWS.config({
  :access_key_id => KEY,
  :secret_access_key => SECRET_KEY
})
ec2 = AWS::EC2.new
elb = AWS::ELB.new

i = ec2.instances["i-abcd1234"]
elb.load_balancers["lb-name"].instances.register(i)

When I run this code, I get this error:

AWS::ELB::Errors::ValidationError: ELB in VPC is not supported in this version of API. Please try 2011-11-15 or newer.

My aws-sdk gem is the most current version available through RubyGems, it was updated this week. Is this just not a feature available in the Ruby SDK for AWS? What can I do to add a VPC node to a Load Balancer with Ruby code, through this gem or otherwise?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T08:27:22+00:00Added an answer on June 9, 2026 at 8:27 am

    Resolved: This error was the result of the ELB portion of the aws-sdk gem using an old version of the AWS API. A new gem version (1.6.1) was released on August 6, 2012 which causes ELB to use the 2012-06-01 version of the API, and now instances can be added to an ELB using code like in the question.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code should exhibit intended functionality: <head> <style> a:active { color:teal; } a:hover
consider the following code, which represents an attempt to implement partial matching. the intended
Following code: <%= render 'shared/error_messages', f.object %> where f.object is instance of a class
Following code is a pretty simple and complete JQuery Dialog. Everything works. Problem is
Take the following demo code (from the GIO answer to this question), which uses
The following code is intended to retrieve a file via FTP. However, I'm getting
The following code will: Test to see if the characters in a div are
I have the following code, and if this was in C# or VB.Net it
The following code is a test program wriiten to understand the behaviour of select()
The following code is intended to do a purely ajax POST request, instead it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.