Added Connection to config

This commit is contained in:
Rahul Menon 2015-02-25 15:04:17 +05:30
parent fc84b3a788
commit 38a8232e9a
1 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import (
awsGo "github.com/awslabs/aws-sdk-go/aws"
"github.com/awslabs/aws-sdk-go/gen/autoscaling"
awsEc2 "github.com/awslabs/aws-sdk-go/gen/ec2"
"github.com/awslabs/aws-sdk-go/gen/route53"
"github.com/awslabs/aws-sdk-go/gen/s3"
)
@ -32,6 +33,7 @@ type AWSClient struct {
rdsconn *rds.Rds
r53conn *route53.Route53
region string
awsEc2conn *awsEc2.EC2
}
// Client configures and returns a fully initailized AWSClient
@ -76,6 +78,10 @@ func (c *Config) Client() (interface{}, error) {
// See http://docs.aws.amazon.com/general/latest/gr/sigv4_changes.html
log.Println("[INFO] Initializing Route53 connection")
client.r53conn = route53.New(creds, "us-east-1", nil)
//Check about using us-east-1 for all
log.Println("[INFO] Initializing AWS-GO EC2 Connection")
client.awsEc2conn = awsEc2.New(creds, "us-east-1", nil)
}
if len(errs) > 0 {