Skip to content

Instantly share code, notes, and snippets.

@flavianmissi
Last active December 10, 2015 04:18
Show Gist options
  • Select an option

  • Save flavianmissi/4380339 to your computer and use it in GitHub Desktop.

Select an option

Save flavianmissi/4380339 to your computer and use it in GitHub Desktop.
sample load balancer creation using goamz with validation error (missing Listeners)
package main
import (
"fmt"
"launchpad.net/goamz/aws"
"launchpad.net/goamz/elb"
)
func main() {
auth := aws.Auth{"access", "secret"}
e := elb.New(auth, aws.Region{ELBEndpoint: "https://elasticloadbalancing.amazonaws.com"})
createLB := &elb.CreateLoadBalancer{Name: "testLB"}
resp, err := e.CreateLoadBalancer(createLB)
fmt.Println(resp)
if err != nil {
panic(err.Error())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment