Permalink
Browse files

fix for aws

  • Loading branch information...
peter-edge committed Nov 3, 2015
1 parent e620343 commit 6f201ce90740f6ee0d7a7bd5d1946d6ccba4fff3
Showing with 5 additions and 3 deletions.
  1. +3 −2 ecs-list-ips/main.go
  2. +2 −1 sqs-purge/main.go
@@ -9,6 +9,7 @@ import (
"go.pedge.io/tools/common/aws"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ec2"
"github.com/aws/aws-sdk-go/service/ecs"
)
@@ -30,7 +31,7 @@ func do(awsConfig *aws.Config) error {
if err := env.Populate(&appEnv); err != nil {
return err
}
ecsClient := ecs.New(awsConfig)
ecsClient := ecs.New(session.New(awsConfig))
listContainerInstancesOutput, err := ecsClient.ListContainerInstances(
&ecs.ListContainerInstancesInput{
Cluster: aws.String(appEnv.EcsCluster),
@@ -52,7 +53,7 @@ func do(awsConfig *aws.Config) error {
for i, containerInstance := range describeContainerInstancesOutput.ContainerInstances {
ec2InstanceIDs[i] = containerInstance.Ec2InstanceId
}
ec2Client := ec2.New(awsConfig)
ec2Client := ec2.New(session.New(awsConfig))
describeInstancesOutput, err := ec2Client.DescribeInstances(
&ec2.DescribeInstancesInput{
InstanceIds: ec2InstanceIDs,
@@ -5,6 +5,7 @@ import (
"os"

"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sqs"
"go.pedge.io/env"
"go.pedge.io/tools/common/aws"
@@ -27,7 +28,7 @@ func do(awsConfig *aws.Config) error {
if err := env.Populate(&appEnv); err != nil {
return err
}
sqsClient := sqs.New(awsConfig)
sqsClient := sqs.New(session.New(awsConfig))
createQueueOutput, err := sqsClient.CreateQueue(
&sqs.CreateQueueInput{
QueueName: aws.String(appEnv.QueueName),

0 comments on commit 6f201ce

Please sign in to comment.