Skip to content

Instantly share code, notes, and snippets.

@ian-kent
Created December 9, 2014 15:28
Show Gist options
  • Save ian-kent/e4a864950617c83743b8 to your computer and use it in GitHub Desktop.
Save ian-kent/e4a864950617c83743b8 to your computer and use it in GitHub Desktop.
elasticache.go
package main
import (
"fmt"
"log"
"github.com/crowdmob/goamz/aws"
"github.com/crowdmob/goamz/elasticache"
)
func main() {
auth, err := aws.EnvAuth()
if err != nil {
log.Fatalf("Error getting AWS env auth: %s\n", err)
}
ec := elasticache.New(auth, aws.EUWest)
cc, err := ec.Describe("cache-cluster-name")
fmt.Printf("Host: %s\nPort: %d\n", cc.CacheNodes[0].Endpoint.Host, cc.CacheNodes[0].Endpoint.Port)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment