AWS SDK for the Go programming language.

Overview

AWS SDK for Go

API Reference Join the chat at https://gitter.im/aws/aws-sdk-go Build Status Apache V2 License

aws-sdk-go is the official AWS SDK for the Go programming language.

Checkout our release notes for information about the latest bug fixes, updates, and features added to the SDK.

We announced the General Availability for the AWS SDK for Go V2 (v2). The v2 SDK source is available at https://github.com/aws/aws-sdk-go-v2. Review the v2 SDK's Developer Guide to get started with AWS SDK for Go V2 or review the migration guide if you already use version 1.

Jump To:

Getting Started

Installing

Use go get to retrieve the SDK to add it to your GOPATH workspace, or project's Go module dependencies.

go get github.com/aws/aws-sdk-go

To update the SDK use go get -u to retrieve the latest version of the SDK.

go get -u github.com/aws/aws-sdk-go

Dependencies

The SDK includes a vendor folder containing the runtime dependencies of the SDK. The metadata of the SDK's dependencies can be found in the Go module file go.mod or Dep file Gopkg.toml.

Go Modules

If you are using Go modules, your go get will default to the latest tagged release version of the SDK. To get a specific release version of the SDK use @<tag> in your go get command.

go get github.com/aws/[email protected]

To get the latest SDK repository change use @latest.

go get github.com/aws/[email protected]

Go 1.5

If you are using Go 1.5 without vendoring enabled, (GO15VENDOREXPERIMENT=1), you will need to use ... when retrieving the SDK to get its dependencies.

go get github.com/aws/aws-sdk-go/...

This will still include the vendor folder. The vendor folder can be deleted if not used by your environment.

rm -rf $GOPATH/src/github.com/aws/aws-sdk-go/vendor

Quick Examples

Complete SDK Example

This example shows a complete working Go file which will upload a file to S3 and use the Context pattern to implement timeout logic that will cancel the request if it takes too long. This example highlights how to use sessions, create a service client, make a request, handle the error, and process the response.

  package main

  import (
  	"context"
  	"flag"
  	"fmt"
  	"os"
  	"time"

  	"github.com/aws/aws-sdk-go/aws"
  	"github.com/aws/aws-sdk-go/aws/awserr"
  	"github.com/aws/aws-sdk-go/aws/request"
  	"github.com/aws/aws-sdk-go/aws/session"
  	"github.com/aws/aws-sdk-go/service/s3"
  )

  // Uploads a file to S3 given a bucket and object key. Also takes a duration
  // value to terminate the update if it doesn't complete within that time.
  //
  // The AWS Region needs to be provided in the AWS shared config or on the
  // environment variable as `AWS_REGION`. Credentials also must be provided
  // Will default to shared config file, but can load from environment if provided.
  //
  // Usage:
  //   # Upload myfile.txt to myBucket/myKey. Must complete within 10 minutes or will fail
  //   go run withContext.go -b mybucket -k myKey -d 10m < myfile.txt
  func main() {
  	var bucket, key string
  	var timeout time.Duration

  	flag.StringVar(&bucket, "b", "", "Bucket name.")
  	flag.StringVar(&key, "k", "", "Object key name.")
  	flag.DurationVar(&timeout, "d", 0, "Upload timeout.")
  	flag.Parse()

  	// All clients require a Session. The Session provides the client with
 	// shared configuration such as region, endpoint, and credentials. A
 	// Session should be shared where possible to take advantage of
 	// configuration and credential caching. See the session package for
 	// more information.
  	sess := session.Must(session.NewSession())

 	// Create a new instance of the service's client with a Session.
 	// Optional aws.Config values can also be provided as variadic arguments
 	// to the New function. This option allows you to provide service
 	// specific configuration.
  	svc := s3.New(sess)

  	// Create a context with a timeout that will abort the upload if it takes
  	// more than the passed in timeout.
  	ctx := context.Background()
  	var cancelFn func()
  	if timeout > 0 {
  		ctx, cancelFn = context.WithTimeout(ctx, timeout)
  	}
  	// Ensure the context is canceled to prevent leaking.
  	// See context package for more information, https://golang.org/pkg/context/
	if cancelFn != nil {
  		defer cancelFn()
	}

  	// Uploads the object to S3. The Context will interrupt the request if the
  	// timeout expires.
  	_, err := svc.PutObjectWithContext(ctx, &s3.PutObjectInput{
  		Bucket: aws.String(bucket),
  		Key:    aws.String(key),
  		Body:   os.Stdin,
  	})
  	if err != nil {
  		if aerr, ok := err.(awserr.Error); ok && aerr.Code() == request.CanceledErrorCode {
  			// If the SDK can determine the request or retry delay was canceled
  			// by a context the CanceledErrorCode error code will be returned.
  			fmt.Fprintf(os.Stderr, "upload canceled due to timeout, %v\n", err)
  		} else {
  			fmt.Fprintf(os.Stderr, "failed to upload object, %v\n", err)
  		}
  		os.Exit(1)
  	}

  	fmt.Printf("successfully uploaded file to %s/%s\n", bucket, key)
  }

Overview of SDK's Packages

The SDK is composed of two main components, SDK core, and service clients. The SDK core packages are all available under the aws package at the root of the SDK. Each client for a supported AWS service is available within its own package under the service folder at the root of the SDK.

  • aws - SDK core, provides common shared types such as Config, Logger, and utilities to make working with API parameters easier.

    • awserr - Provides the error interface that the SDK will use for all errors that occur in the SDK's processing. This includes service API response errors as well. The Error type is made up of a code and message. Cast the SDK's returned error type to awserr.Error and call the Code method to compare returned error to specific error codes. See the package's documentation for additional values that can be extracted such as RequestID.

    • credentials - Provides the types and built in credentials providers the SDK will use to retrieve AWS credentials to make API requests with. Nested under this folder are also additional credentials providers such as stscreds for assuming IAM roles, and ec2rolecreds for EC2 Instance roles.

    • endpoints - Provides the AWS Regions and Endpoints metadata for the SDK. Use this to lookup AWS service endpoint information such as which services are in a region, and what regions a service is in. Constants are also provided for all region identifiers, e.g UsWest2RegionID for "us-west-2".

    • session - Provides initial default configuration, and load configuration from external sources such as environment and shared credentials file.

    • request - Provides the API request sending, and retry logic for the SDK. This package also includes utilities for defining your own request retryer, and configuring how the SDK processes the request.

  • service - Clients for AWS services. All services supported by the SDK are available under this folder.

How to Use the SDK's AWS Service Clients

The SDK includes the Go types and utilities you can use to make requests to AWS service APIs. Within the service folder at the root of the SDK you'll find a package for each AWS service the SDK supports. All service clients follow common pattern of creation and usage.

When creating a client for an AWS service you'll first need to have a Session value constructed. The Session provides shared configuration that can be shared between your service clients. When service clients are created you can pass in additional configuration via the aws.Config type to override configuration provided by in the Session to create service client instances with custom configuration.

Once the service's client is created you can use it to make API requests the AWS service. These clients are safe to use concurrently.

Configuring the SDK

In the AWS SDK for Go, you can configure settings for service clients, such as the log level and maximum number of retries. Most settings are optional; however, for each service client, you must specify a region and your credentials. The SDK uses these values to send requests to the correct AWS region and sign requests with the correct credentials. You can specify these values as part of a session or as environment variables.

See the SDK's configuration guide for more information.

See the session package documentation for more information on how to use Session with the SDK.

See the Config type in the aws package for more information on configuration options.

Configuring Credentials

When using the SDK you'll generally need your AWS credentials to authenticate with AWS services. The SDK supports multiple methods of supporting these credentials. By default the SDK will source credentials automatically from its default credential chain. See the session package for more information on this chain, and how to configure it. The common items in the credential chain are the following:

  • Environment Credentials - Set of environment variables that are useful when sub processes are created for specific roles.

  • Shared Credentials file (~/.aws/credentials) - This file stores your credentials based on a profile name and is useful for local development.

  • EC2 Instance Role Credentials - Use EC2 Instance Role to assign credentials to application running on an EC2 instance. This removes the need to manage credential files in production.

Credentials can be configured in code as well by setting the Config's Credentials value to a custom provider or using one of the providers included with the SDK to bypass the default credential chain and use a custom one. This is helpful when you want to instruct the SDK to only use a specific set of credentials or providers.

This example creates a credential provider for assuming an IAM role, "myRoleARN" and configures the S3 service client to use that role for API requests.

  // Initial credentials loaded from SDK's default credential chain. Such as
  // the environment, shared credentials (~/.aws/credentials), or EC2 Instance
  // Role. These credentials will be used to to make the STS Assume Role API.
  sess := session.Must(session.NewSession())

  // Create the credentials from AssumeRoleProvider to assume the role
  // referenced by the "myRoleARN" ARN.
  creds := stscreds.NewCredentials(sess, "myRoleArn")

  // Create service client value configured for credentials
  // from assumed role.
  svc := s3.New(sess, &aws.Config{Credentials: creds})

See the credentials package documentation for more information on credential providers included with the SDK, and how to customize the SDK's usage of credentials.

The SDK has support for the shared configuration file (~/.aws/config). This support can be enabled by setting the environment variable, "AWS_SDK_LOAD_CONFIG=1", or enabling the feature in code when creating a Session via the Option's SharedConfigState parameter.

  sess := session.Must(session.NewSessionWithOptions(session.Options{
      SharedConfigState: session.SharedConfigEnable,
  }))

Configuring AWS Region

In addition to the credentials you'll need to specify the region the SDK will use to make AWS API requests to. In the SDK you can specify the region either with an environment variable, or directly in code when a Session or service client is created. The last value specified in code wins if the region is specified multiple ways.

To set the region via the environment variable set the "AWS_REGION" to the region you want to the SDK to use. Using this method to set the region will allow you to run your application in multiple regions without needing additional code in the application to select the region.

AWS_REGION=us-west-2

The endpoints package includes constants for all regions the SDK knows. The values are all suffixed with RegionID. These values are helpful, because they reduce the need to type the region string manually.

To set the region on a Session use the aws package's Config struct parameter Region to the AWS region you want the service clients created from the session to use. This is helpful when you want to create multiple service clients, and all of the clients make API requests to the same region.

  sess := session.Must(session.NewSession(&aws.Config{
      Region: aws.String(endpoints.UsWest2RegionID),
  }))

See the endpoints package for the AWS Regions and Endpoints metadata.

In addition to setting the region when creating a Session you can also set the region on a per service client bases. This overrides the region of a Session. This is helpful when you want to create service clients in specific regions different from the Session's region.

  svc := s3.New(sess, &aws.Config{
      Region: aws.String(endpoints.UsWest2RegionID),
  })

See the Config type in the aws package for more information and additional options such as setting the Endpoint, and other service client configuration options.

Making API Requests

Once the client is created you can make an API request to the service. Each API method takes a input parameter, and returns the service response and an error. The SDK provides methods for making the API call in multiple ways.

In this list we'll use the S3 ListObjects API as an example for the different ways of making API requests.

  • ListObjects - Base API operation that will make the API request to the service.

  • ListObjectsRequest - API methods suffixed with Request will construct the API request, but not send it. This is also helpful when you want to get a presigned URL for a request, and share the presigned URL instead of your application making the request directly.

  • ListObjectsPages - Same as the base API operation, but uses a callback to automatically handle pagination of the API's response.

  • ListObjectsWithContext - Same as base API operation, but adds support for the Context pattern. This is helpful for controlling the canceling of in flight requests. See the Go standard library context package for more information. This method also takes request package's Option functional options as the variadic argument for modifying how the request will be made, or extracting information from the raw HTTP response.

  • ListObjectsPagesWithContext - same as ListObjectsPages, but adds support for the Context pattern. Similar to ListObjectsWithContext this method also takes the request package's Option function option types as the variadic argument.

In addition to the API operations the SDK also includes several higher level methods that abstract checking for and waiting for an AWS resource to be in a desired state. In this list we'll use WaitUntilBucketExists to demonstrate the different forms of waiters.

  • WaitUntilBucketExists. - Method to make API request to query an AWS service for a resource's state. Will return successfully when that state is accomplished.

  • WaitUntilBucketExistsWithContext - Same as WaitUntilBucketExists, but adds support for the Context pattern. In addition these methods take request package's WaiterOptions to configure the waiter, and how underlying request will be made by the SDK.

The API method will document which error codes the service might return for the operation. These errors will also be available as const strings prefixed with "ErrCode" in the service client's package. If there are no errors listed in the API's SDK documentation you'll need to consult the AWS service's API documentation for the errors that could be returned.

  ctx := context.Background()

  result, err := svc.GetObjectWithContext(ctx, &s3.GetObjectInput{
      Bucket: aws.String("my-bucket"),
      Key: aws.String("my-key"),
  })
  if err != nil {
      // Cast err to awserr.Error to handle specific error codes.
      aerr, ok := err.(awserr.Error)
      if ok && aerr.Code() == s3.ErrCodeNoSuchKey {
          // Specific error code handling
      }
      return err
  }

  // Make sure to close the body when done with it for S3 GetObject APIs or
  // will leak connections.
  defer result.Body.Close()

  fmt.Println("Object Size:", aws.Int64Value(result.ContentLength))

API Request Pagination and Resource Waiters

Pagination helper methods are suffixed with "Pages", and provide the functionality needed to round trip API page requests. Pagination methods take a callback function that will be called for each page of the API's response.

   objects := []string{}
   err := svc.ListObjectsPagesWithContext(ctx, &s3.ListObjectsInput{
       Bucket: aws.String(myBucket),
   }, func(p *s3.ListObjectsOutput, lastPage bool) bool {
       for _, o := range p.Contents {
           objects = append(objects, aws.StringValue(o.Key))
       }
       return true // continue paging
   })
   if err != nil {
       panic(fmt.Sprintf("failed to list objects for bucket, %s, %v", myBucket, err))
   }

   fmt.Println("Objects in bucket:", objects)

Waiter helper methods provide the functionality to wait for an AWS resource state. These methods abstract the logic needed to check the state of an AWS resource, and wait until that resource is in a desired state. The waiter will block until the resource is in the state that is desired, an error occurs, or the waiter times out. If a resource times out the error code returned will be request.WaiterResourceNotReadyErrorCode.

  err := svc.WaitUntilBucketExistsWithContext(ctx, &s3.HeadBucketInput{
      Bucket: aws.String(myBucket),
  })
  if err != nil {
      aerr, ok := err.(awserr.Error)
      if ok && aerr.Code() == request.WaiterResourceNotReadyErrorCode {
          fmt.Fprintf(os.Stderr, "timed out while waiting for bucket to exist")
      }
      panic(fmt.Errorf("failed to wait for bucket to exist, %v", err))
  }
  fmt.Println("Bucket", myBucket, "exists")

Getting Help

Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests.

  • Ask a question on StackOverflow and tag it with the aws-sdk-go tag.
  • Come join the AWS SDK for Go community chat on gitter.
  • Open a support ticket with AWS Support.
  • If you think you may have found a bug, please open an issue.

This SDK implements AWS service APIs. For general issues regarding the AWS services and their limitations, you may also take a look at the Amazon Web Services Discussion Forums.

Opening Issues

If you encounter a bug with the AWS SDK for Go we would like to hear about it. Search the existing issues and see if others are also experiencing the issue before opening a new issue. Please include the version of AWS SDK for Go, Go language, and OS you’re using. Please also include reproduction case when appropriate.

The GitHub issues are intended for bug reports and feature requests. For help and questions with using AWS SDK for Go please make use of the resources listed in the Getting Help section. Keeping the list of open issues lean will help us respond in a timely manner.

Contributing

We work hard to provide a high-quality and useful SDK for our AWS services, and we greatly value feedback and contributions from our community. Please review our contributing guidelines before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution.

Maintenance and support for SDK major versions

For information about maintenance and support for SDK major versions and our underlying dependencies, see the following in the AWS SDKs and Tools Shared Configuration and Credentials Reference Guide:

Resources

Developer guide - This document is a general introduction on how to configure and make requests with the SDK. If this is your first time using the SDK, this documentation and the API documentation will help you get started. This document focuses on the syntax and behavior of the SDK. The Service Developer Guide will help you get started using specific AWS services.

SDK API Reference Documentation - Use this document to look up all API operation input and output parameters for AWS services supported by the SDK. The API reference also includes documentation of the SDK, and examples how to using the SDK, service client API operations, and API operation require parameters.

Service Documentation - Use this documentation to learn how to interface with AWS services. These guides are great for getting started with a service, or when looking for more information about a service. While this document is not required for coding, services may supply helpful samples to look out for.

SDK Examples - Included in the SDK's repo are several hand crafted examples using the SDK features and AWS services.

Forum - Ask questions, get help, and give feedback

Issues - Report issues, submit pull requests, and get involved (see Apache 2.0 License)

Comments
  • [S3] RequestError with UploadPart call

    [S3] RequestError with UploadPart call

    Please fill out the sections below to help us address your issue.

    Version of AWS SDK for Go?

    v1.18.2

    Version of Go (go version)?

    go version go1.10.4

    What issue did you see?

    We are using MultipartUpload for uploading some mp3 files to S3. At times, the S3.UploadPart function throws the following error:

    RequestError: send request failed
    caused by: Put https://<bucket_name>.s3.ap-southeast-1.amazonaws.com/filename.mp3?partNumber=1&uploadId=FQEnFylcgwfiSyqAFJSAaBPujuG_ooLOCrPnHv5vO_Un0W5_Ml8DYeqB4xx7US_IFbcdkjrWZqizTemAKyx3MNYwku6BPRqvLz3eGxAqndFUUw--: http: Request.ContentLength=4674720 with nil Body
    

    Here is the code the code that handles the uploading part:

    func uploadPart(svc *s3.S3, resp *s3.CreateMultipartUploadOutput, fileBytes []byte, partNumber int) (*s3.CompletedPart, error) {
    	tryNum := 1
    
    	body := bytes.NewReader(fileBytes)
    	partInput := &s3.UploadPartInput{
    		Body:          body,
    		Bucket:        resp.Bucket,
    		Key:           resp.Key,
    		PartNumber:    aws.Int64(int64(partNumber)),
    		UploadId:      resp.UploadId,
    		ContentLength: aws.Int64(int64(len(fileBytes))),
    	}
    
    	for tryNum <= maxRetries {
    		uploadResult, err := svc.UploadPart(partInput)
    		if err != nil {
    			if tryNum == maxRetries {
    				if aerr, ok := err.(awserr.Error); ok {
    					return nil, aerr
    				}
    				return nil, err
    			}
    			log.Printf("Retrying to upload part #%v\n", partNumber)
    			tryNum++
    		} else {
    			return &s3.CompletedPart{
    				ETag:       uploadResult.ETag,
    				PartNumber: aws.Int64(int64(partNumber)),
    			}, nil
    		}
    	}
    	return nil, nil
    }
    
    

    Steps to reproduce

    Not reproducable. Happens only some times. The body is not actually nil. Made sure of it by checking it in the logs.

    bug 
    opened by arjunmahishi 55
  • Discussion: How should you unit test code which uses the aws-sdk-go

    Discussion: How should you unit test code which uses the aws-sdk-go

    Consider the following case:

    I have a package within my project which is my DAO package. It has methods like GetFooById("some-id"), which returns me the Foo object from dynamoDB which has the ID "some-id".

    This package constructs a dynamo condition, and calls DynamoClient.Query().

    How should one unit test my package without hitting a real DynamoDB, or without running a stub server which responds with AWS-like responses?

    Here's what I've considered/experimented with:

    1. Interface the parts of the AWS SDK which my code touches, and then use go-mock or alike. Cons: I have to then maintain a lot of extra interfaces, just for testing purposes
    2. Use withmock to replace the entire AWS package Cons: Withmock isn't well maintained, is slow, and doesn't play well with tools like godep or gocheck
    3. Wrap the calls to the sdk with a private variable defined function, which I can re-define in my tests, and manipulate to return fake objects. Cons: Is much like suggestion 1, and implies you have lines of code which aren't technically tested.

    Other options:

    • Have the AWS SDK present interfaces, so that using existing mocking tools doesn't require implementation of an interface.
    • Stub out AWS using a HTTP stub server.
    • Write some new mocking tool which achieves what we want...

    What are people's thoughts on this? What is the intention for onward testing of this sdk? (I see a small amount of unit tests at the client level, and some integration tests on the modules...)

    opened by philcluff 41
  • aws/credential: Add credential_process provider

    aws/credential: Add credential_process provider

    Fixes #1834 Continuation of #1874

    How It Works

    If you have a method of sourcing credentials that isn't built in to the [SDK], you can integrate it by using credential_process in the config file. The [SDK] will call that command exactly as given and then read json data from stdout.

    For example, you may have this configuration (this example uses awsprocesscreds for SAML integration):

    [dev]
    credential_process = awsprocesscreds-saml -e https://example.okta.com/home/amazon_aws/blob/123 -u '[email protected]' -p okta -a arn:aws:iam::123456789012:role/okta-dev
    

    Assuming the process returns a valid json like this example (but with valid credentials):

    {
      "Version": 1,
      "AccessKeyId": "<access key id>",
      "SecretAccessKey": "<secret access key>",
      "SessionToken": "<optional session token>",
      "Expiration": "<optional expiration date in ISO8601>"
    }
    

    You could use it in your code like this:

    sess := session.Must(session.NewSessionWithOptions(session.Options{
        Profile: "dev",
    }))
    
    svc := s3.New(sess)
    
    result, err := svc.ListBuckets(nil)
    ...
    

    You can also provide the process command programmatically without using a config file.

    creds := credentials.NewCredentials(&processcreds.ProcessProvider{
        Process: "/path/to/a/cred/process",
    })
    
    sess := session.Must(session.NewSessionWithOptions(session.Options{
        Credentials: creds,
    }))
    
    svc := s3.New(sess)
    

    This Pull Request

    This PR adds support for calling a credential_process and builds on the work of @micahhausler, taking into account review notes by @jasdel.

    Notable changes over #1874:

    • Rebased, fixing conflict
    • Removes the processcreds provider from the default credential chain
    • Adds further protection of credential_process including a timeout and small buffer limit (in case of a hung process or a process producing much data) - limits are configurable
    • Uses goroutines for executing process, reading data from the process
    • Moves the new provider and test into a processcreds package
    • Creates const error messages and default values
    • Completely avoids reading shared config file, leaving this to the existing providers
    • Process is passed via input parameter to the provider allowing for programmatic defining without need for shared config file
    • Makes Expiration of type Time
    • Carefully handles the environment (which is tricky when tests clear the env)
    • Avoids issues with string splitting the command by using subshells on Windows and Linux
    • Lets exec.Command fail rather than doing pre-checks
    • Captures both stdout and stderr in output
    • Does not mess with profiles, leaving that to existing resources
    • Does not use testify
    • Includes tests providing near 100% code coverage

    Please let me know if you have additional review.

    See related:

    • aws/aws-sdk-js#1923
    • boto/botocore#1316
    • serverless/serverless#4838
    • oktadeveloper/okta-aws-cli-assume-role#203
    • aws/aws-sdk-ruby#1820
    • aws/aws-sdk-java-v2#455
    opened by YakDriver 40
  • GetRecords  blocked for more than 10 minutes

    GetRecords blocked for more than 10 minutes

    Hi, I encounter an issue that it took more than 10 minutes to call GetRecords. So, there was an error "Iterator expired", when get records next time. It was correct when I started my application, and issue happened after several minutes. GetRecords should not be blocked, from AWS doc

    I enabled kinesis api debug info: log attached. Did you encounter this issue? And how to solve it?

    Thank you in advance!

    debug_info.log.gz get_record_code

    guidance 
    opened by nonexu 37
  • Unable to make ec2metadata request (returning 301)

    Unable to make ec2metadata request (returning 301)

    I am receiving the following error when attempting to make a basic role request.

    EC2RoleRequestError: no EC2 instance role found\ncaused by: EC2MetadataError: failed to make EC2Metadata request

    sess := session.New()
    creds := ec2rolecreds.NewCredentials(sess)
    config = &aws.Config{
        Credentials: creds,
        Region:      aws.String("us-west-2"),
        LogLevel:    aws.LogLevel(aws.LogDebugWithHTTPBody),
    }
    svc = dynamodb.New(sess, config)
    

    When I look at the request log, I see that it's making a 301 because iamSecurityCredsPath is missing a trailing slash.

    We are running this inside a docker container, when we enter a bash prompt inside the container, we can make aws cli requests without issue.

    3rd-party 
    opened by cam-stitt 31
  • Make v4 Signer public

    Make v4 Signer public

    Following @jasdel request, this is another try to make the aws v4 signer public, following in #662 footsteps.

    My current approach is to be minimally invasive: keep the private aws/signer/v4 package, which merely translates aws requests to the public aws/signer/v4 interface, which uses http.Request instead.

    A cleaner approach would be to remove the private signer entirely and adjust where necessary; also, we could split private/ public usage using struct embedding or similar, if necessary.

    The corehandler is still missing, since I'm not sure where this would be used internally.

    Feedback very welcome.

    opened by nicolai86 31
  • GetRecords hangs

    GetRecords hangs

    Hi,

    I'm having some problems with my application that is reading records from Kinesis. It seems to be randomly hanging on the GetRecords request until either Kinesis kills the connection or the subsequent GetRecords will fail due to an expired iterator.

    I have a stream with four shards. Total incoming data is around 500 kb/s. I have an application that starts a worker per shard- each worker is split into 5 parts, each communicating with the next over its own channel.

    The KinesisReader is very straight forward:

    ...
    for {
        // get records
        ts_start = time.Now()
        records, err := GetKinesisRecordsAndUpdateIterator(kinesisClient, iterator)
        if err != nil {
            log.Error("[WORKER #%v | KINESIS READER] Failed to get records (took=%v): %v", r.workerId, time.Since(ts_start), err)
            return
        }
        log.Info("[WORKER #%v | KINESIS READER] Read %v records from Kinesis (took=%v)", r.workerId, len(records), time.Since(ts_start))
        ...
    }
    ...
    
    func GetKinesisRecordsAndUpdateIterator(client *kinesis.Kinesis, iterator *string) ([]*kinesis.Record, error) {
        getRecordsInput := &kinesis.GetRecordsInput{
            ShardIterator: iterator,
        }
        resp, err := client.GetRecords(getRecordsInput)
        if err != nil {
            return nil, err
        }
        *iterator = *resp.NextShardIterator
    
        return resp.Records, nil
    }
    

    If it does not read any records it will go to sleep for 10 seconds. It will kill the worker on any errors and start a new one (hence it has failed 165 times in the last 12 hours).

    The three other workers happily continue reading records while this is happening.

    This results in the following log examples:

    2015/06/30 06:25:07.073380 INFO [WORKER #157 | KINESIS READER] Read 1 records from Kinesis (took=30.845742ms)
    2015/06/30 06:25:07.089282 INFO [WORKER #157 | KINESIS READER] Read 0 records from Kinesis (took=15.8282ms)
    2015/06/30 06:31:50.780351 INFO [WORKER #157 | KINESIS READER] Read 21 records from Kinesis (took=6m33.690849627s)
    2015/06/30 06:31:51.185088 ERROR [WORKER #157 | KINESIS READER] Failed to get records (took=73.276055ms): ExpiredIteratorException: Iterator expired. The iterator was created at time Tue Jun 30 06:25:17 UTC 2015 while right now it is Tue Jun 30 06:31:51 UTC 2015 which is further in the future than the tolerated delay of 300000 milliseconds.
    status code: 400, request id: []
    
    2015/06/30 06:37:24.780944 INFO [WORKER #165 | KINESIS READER] Read 0 records from Kinesis (took=20.868442ms)
    06:37:34.977293 INFO [WORKER #165 | KINESIS READER] Read 25 records from Kinesis (took=196.090744ms)
    2015/06/30 06:37:35.228885 INFO [WORKER #165 | KINESIS READER] Read 2 records from Kinesis (took=33.813113ms)
    2015/06/30 06:37:35.258778 INFO [WORKER #165 | KINESIS READER] Read 0 records from Kinesis (took=24.589261ms)
    2015/06/30 06:37:45.439487 INFO [WORKER #165 | KINESIS READER] Read 33 records from Kinesis (took=180.496173ms)
    2015/06/30 06:37:45.650751 INFO [WORKER #165 | KINESIS READER] Read 1 records from Kinesis (took=35.829663ms)
    2015/06/30 06:37:45.674542 INFO [WORKER #165 | KINESIS READER] Read 0 records from Kinesis (took=23.662061ms)
    2015/06/30 06:42:58.103110 ERROR [WORKER #165 | KINESIS READER] Failed to get records (took=5m2.42835127s): SerializationError: failed decoding JSON RPC response
    caused by: read tcp 54.239.19.115:443: connection reset by peer
    

    The second one is by far the most frequent example.

    Am I doing something wrong here? Any suggestions as to what might be wrong?

    service-api 
    opened by fantyz 29
  • Support context pattern

    Support context pattern

    See this blog article:

    https://blog.golang.org/context

    We use this heavily in all aspects of our SOA, and it allows us to inject request scoped parameters to systems that need them to provide useful information -- such as logging or in-memory caches. Here is a drastically simplified example:

    type key int
    const LoggerKey key = 0
    const RequestIdKey key = 1
    const MethodNameKey key = 2
    
    type Logger interface {
        Debug(ctx context.Context, message, args ...interface{})
    }    
    
    // alternatively the context interface could have the log methods on them to avoid this step
    func LoggerFrom(ctx context.Context) Logger {
        if logger, ok := ctx.Value(LoggerKey).(Logger); ok {
            return logger
        } else {
            return nullLogger
        }
    }
    
    ctx := context.WithCancel(context.Background())
    ctx = context.WithValue(ctx, RequestIdKey, uuid.NewV4())
    ctx = context.WithValue(ctx, LoggerKey, myLogger)
    
    someFrontendMethod(ctx, other, arguments)
    
    ...
    
    func someFrontendMethod(ctx context.Context, other int, arguments string) {
        ctx = context.WithValue(ctx, MethodNameKey, "someFrontendMethod")
        result, err := aws.DynamoDb().Get(ctx, ...) 
        ...
    }
    
    // totally made up interface, not implying this should be the real AWS one
    func (d *DynamoDb) Get(ctx context.Context, some int, args string) (*Result, error) {
        LoggerFrom(ctx).Debug(ctx, "dynamodb.get - starting request")
        ...
    }
    

    This would then output something like:

    [DEBUG] [requestId=5f0712749191adda1079e71c2403ec24d65ebf32] someFrontendMethod: dynamodb.get - starting request
    

    Additionally, in the first method, you would be able to timeout the call to someFrontendMethod by closing the Done channel on the context. Depending upon how much of the callstack is using the context, every goroutine underneath it would be notified of the cancelled context and abort as soon as possible. In the case of the AWS lib, this could be used to abort an exponential backoff algorithm that is currently sleeping without the caller of the lib having to cancel manually somehow.

    feature-request 
    opened by justonia 28
  • s3 error xml

    s3 error xml

    when we get an s3 error it's automatically unmarshalled: https://github.com/aws/aws-sdk-go/blob/master/service/s3/unmarshal_error.go which hides the original XML error message. In some case we want the original error, for example on a 301 we want to see what the correct bucket location should be. awserr.Error has an OrigErr() function but that field is always initialized to nil.

    guidance 
    opened by kahing 26
  • Connect to RDS using rdsutils.BuildAuthToken not working

    Connect to RDS using rdsutils.BuildAuthToken not working

    Please fill out the sections below to help us address your issue.

    Version of AWS SDK for Go?

    v1.8.19-6-g7b500fb

    Version of Go (go version)?

    go 1.8

    What issue did you see?

    following the doc but unable to make successful DB connection using IAM role from EC2 Also, this is particularly hard to debug because of not actually able to run code as EC2 on dev to test

    Steps to reproduce

    I follow the below step in https://docs.aws.amazon.com/sdk-for-go/api/service/rds/rdsutils/#BuildAuthToken and use the exact same code snippet but I believe there's some issue with the instruction:

    authToken, err := BuildAuthToken(dbEndpoint, awsRegion, dbUser, awsCreds)
    
    // Create the MySQL DNS string for the DB connection
    // user:[email protected](endpoint)/dbname?<params>
    dnsStr = fmt.Sprintf("%s:%[email protected](%s)/%s?tls=true",
       dbUser, authToken, dbEndpoint, dbName,
    )
    
    // Use db to perform SQL operations on database
    db, err := sql.Open("mysql", dnsStr)
    

    I have tried the above instruction but it was throwing signing errors

    below is my latest code snippet, I have tried various different fortmat and this is the one i last end up with:

    // c.Hostname = host.xxxx.us-east-1.rds.amazonaws.com
    // c.Port = 3306
    
    hostlocation := fmt.Sprintf("https://%v:%v", c.Hostname, c.Port)
    token, stdErr := rdsutils.BuildAuthToken(hostlocation, "us-east-1", "appuser", stscreds.NewCredentials(sess, "arn:aws:iam::[AWS ID]:role/SomeRole"))
    
    dnsStr := fmt.Sprintf("[appuser:%[email protected](%s)]:%v/%s?tls=true", token, c.Hostname, c.Port, "dbname")
    
    // Connect to database
    db, stdErr := sql.Open("mysql", dnsStr)
    

    for this one i got: StdError: invalid DSN: did you forget to escape a param value?

    the token returned is actually in the following format:

    host.xxxx.us-east-1.rds.amazonaws.com:3306?Action=connect&DBUser=appuser&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIAJHJ4MX7HB6STZ5QQ%2F20170504%2Fus-east-1%2Frds-db%2Faws4_request&X-Amz-Date=20170504T164655Z&X-Amz-Expires=900&X-Amz-Security-Token=FQoDYXdzENr%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDB3PYlunbHE2bh4ylCLWAevRs7cztGGATW3iJm0tpL1J2G%2FsqJjilAlhI2uj6VW%2BWH0txpt2bZ7DgQeZ0lutoJj3rffcznu7o0VIG%2F7L8MXC11BjXOIOEXFwx%2BhEIAqM%2F3v9vpa9Jp1L2xqPBs%2FLuOYmHFxufykYE3D9%2BdoPRp3srEj3AqGbv9Nanw6zRXbsRkAj96VzsAnFTzyTAyOknBUDkWpBzjR%2Fo1Gqdd9gwu6HdJRcp6H%2B9oI0FLrDuQqUfSZez5BUspe4EYDWctSEuNoNREQzzUkkoU2yXB69m4KxA4TyIy4ogLatyAU%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=2b249517f6dc4ad145232cdab3ea59e9b8b20dedad6666b07bbe686e33b6859e
    

    I am not sure if this is the right string that should replace the DSN/DNS password field as indicated in the doc

    Can anyone please help me figure out what the actual and correct DSN or DNS will look like? some example will be very helpful as I can just follow the same structure

    Thanks

    guidance 
    opened by jhwang09 24
  • Utilize io.Reader not io.ReadSeeker where possible

    Utilize io.Reader not io.ReadSeeker where possible

    Summary

    I noticed the s3 calls are using io.ReadSeeker for Body behind the scenes, which seems to be contributing to a huge waste of memory for general use cases. The issue is that ReadSeeker needs to persist bytes so that it can seek backwards, while the io.Reader interface can garbage collect bytes once it has read them, allowing it to Stream data from network or disk.

    Observed

    Using the s3 api for a web service which uses PutObject to place a file into s3, the file must be fully loaded into memory using io.ReadSeeker. For large objects (300MB) this meant a RAM use of about > 700MB.

    Expected

    The io.Reader interface should stream input bytes and allow them to be garbage collected once Read (and presumably written to s3).

    Additional Information

    Replacing aws-sdk-go with mitchellh/goamz dropped my RAM use per 300MB request from 700MB to ~8MB. I have a minimal test case to demonstrate this, if desired.

    feature-request 
    opened by DavidJFelix 24
  • AppRunner DescribeService should return ServiceUrl when IsPubliclyAccessible = false

    AppRunner DescribeService should return ServiceUrl when IsPubliclyAccessible = false

    Describe the bug

    This issue arose while using aws terraform provider v.4.40.0. But digging more it looks the problem is how the API returns the response calling DescribeService and only if IsPubliclyAccessible = false.

    As per documentation the response should return ServiceUrl however it doesn't.

    This is the output from one of AppRunner services I've deployed.

    {
        "Service": {
            "ServiceName": "my-service-name",
            "ServiceId": "XXXXXXXXXXXXXXXXXXXXXX",
            "ServiceArn": "arn:aws:apprunner:eu-west-1:123456789012:service/my-service-name/XXXXXXXXXXXXXXXXXXXXXX",
            "CreatedAt": 1669040555.0,
            "UpdatedAt": 1669040555.0,
            "Status": "RUNNING",
            "SourceConfiguration": {
                "ImageRepository": {
                    "ImageIdentifier": "123456789012.dkr.ecr.eu-west-1.amazonaws.com/my-image:latest",
                    "ImageConfiguration": {
                        "Port": "8000"
                    },
                    "ImageRepositoryType": "ECR"
                },
                "AutoDeploymentsEnabled": false,
                "AuthenticationConfiguration": {
                    "AccessRoleArn": "arn:aws:iam::123456789012:role/MyAppRunnerBuildRole"
                }
            },
            "InstanceConfiguration": {
                "Cpu": "2048",
                "Memory": "4096",
                "InstanceRoleArn": "arn:aws:iam::123456789012:role/MyAppRunnerInstanceRole"
            },
            "HealthCheckConfiguration": {
                "Protocol": "HTTP",
                "Path": "/api/ping",
                "Interval": 5,
                "Timeout": 2,
                "HealthyThreshold": 1,
                "UnhealthyThreshold": 5
            },
            "AutoScalingConfigurationSummary": {
                "AutoScalingConfigurationArn": "arn:aws:apprunner:eu-west-1:123456789012:autoscalingconfiguration/MyAutoScalingConfiguration/1/YYYYYYYYYYYYYYYYYYYY",
                "AutoScalingConfigurationName": "MyAutoScalingConfiguration",
                "AutoScalingConfigurationRevision": 1
            },
            "NetworkConfiguration": {
                "EgressConfiguration": {
                    "EgressType": "DEFAULT"
                },
                "IngressConfiguration": {
                    "IsPubliclyAccessible": false
                }
            }
        }
    }
    

    Not sure if this is supposed to happen or not, but the console returns the Url even if the service is not publicly accessible.

    Is this something that can be done here or it's a bug in the APIs?

    Expected Behavior

    I'm expecting to get the ServiceUrl even if the Service is not publicly accessible.

    Current Behavior

    DescribeService does not return ServiceUrl if the service is deployed with a VPC interface endpoint to be accessible only within the VPC.

    Reproduction Steps

    1. Run aws apprunner describe-service --service-arn <service_arn> for a service which has been deployed accepting traffic from the VPC only though the interface endpoint.
    2. It doesn't return the ServiceUrl
    3. Go to the console. For the same service it shows the proper URL.

    Possible Solution

    No response

    Additional Information/Context

    No response

    SDK version used

    v1.44.141

    Environment details (Version of Go (go version)? OS name and version, etc.)

    go 1.11

    bug needs-triage 
    opened by sgrilux 0
  • panic when using timestream QueryWithContext with X-Ray

    panic when using timestream QueryWithContext with X-Ray

    Describe the bug

    When using timestreamquery QueryWithContext function with X-Ray, the program panic with the error: "panic: failed to begin subsegment named 'Timestream Query': segment cannot be found."

    The DescribeEndpoints call queued before QueryWithContext is not getting context set up.

    Expected Behavior

    I expect it to not panic.

    Current Behavior

    panic: failed to begin subsegment named 'Timestream Query': segment cannot be found.
    
    goroutine 1 [running]:
    github.com/aws/aws-xray-sdk-go/strategy/ctxmissing.(*DefaultRuntimeErrorStrategy).ContextMissing(0xc0000302d0?, {0x17376e0?, 0xc00062cd70?})
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/strategy/ctxmissing/default_context_missing.go:60 +0x29
    github.com/aws/aws-xray-sdk-go/xray.BeginSubsegment({0x1ae9510, 0xc000028068}, {0x18433c3, 0x10})
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/xray/segment.go:272 +0x6a8
    github.com/aws/aws-xray-sdk-go/xray.glob..func1(0xc000368500)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/xray/aws.go:67 +0x75
    github.com/aws/aws-sdk-go/aws/request.(*HandlerList).Run(0xc0003686a8, 0xc000368500)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/aws/request/handlers.go:267 +0x9a
    github.com/aws/aws-sdk-go/aws/request.(*Request).Build(0xc000368500)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/aws/request/request.go:416 +0x39
    github.com/aws/aws-sdk-go/aws/request.(*Request).Sign(0xc000368500)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/aws/request/request.go:437 +0x25
    github.com/aws/aws-sdk-go/aws/request.(*Request).Send(0xc000368500)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/aws/request/request.go:550 +0x13b
    github.com/aws/aws-sdk-go/service/timestreamquery.(*TimestreamQuery).DescribeEndpoints(0x18394a4?, 0x4?)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/service/timestreamquery/api.go:465 +0x25
    github.com/aws/aws-sdk-go/service/timestreamquery.(*discovererDescribeEndpoints).Discover(0xc000638340)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/service/timestreamquery/api.go:496 +0x5e
    github.com/aws/aws-sdk-go/aws/crr.(*EndpointCache).discover(0xc000513908?, {0x1ae3ac0?, 0xc000638340?}, {0x1839e2f, 0x5})
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/aws/crr/cache.go:113 +0x66
    github.com/aws/aws-sdk-go/aws/crr.(*EndpointCache).Get(0xc000638000, {0x1ae3ac0?, 0xc000638340}, {0x1839e2f, 0x5}, 0x1)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/aws/crr/cache.go:64 +0x11b
    github.com/aws/aws-sdk-go/service/timestreamquery.(*discovererDescribeEndpoints).Handler(0xc000638340, 0xc000368000)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/service/timestreamquery/api.go:545 +0x86
    github.com/aws/aws-sdk-go/aws/request.(*HandlerList).Run(0xc0003681c8, 0xc000368000)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/aws/request/handlers.go:267 +0x9a
    github.com/aws/aws-sdk-go/aws/request.(*Request).Build(0xc000368000)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/aws/request/request.go:421 +0x67
    github.com/aws/aws-sdk-go/aws/request.(*Request).Sign(0xc000368000)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/aws/request/request.go:437 +0x25
    github.com/aws/aws-sdk-go/aws/request.(*Request).Send(0xc000368000)
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/aws/request/request.go:550 +0x13b
    github.com/aws/aws-sdk-go/service/timestreamquery.(*TimestreamQuery).QueryWithContext(0x1ae9510?, {0x1ae9580, 0xc0006139e0}, 0x4?, {0x0, 0x0, 0xc00034b0e0?})
            /Users/user/go/pkg/mod/github.com/aws/[email protected]/service/timestreamquery/api.go:1396 +0x186
    main.main()
            /Users/user/Documents/Source/test/ts-test.go:25 +0x185
    exit status 2
    

    Reproduction Steps

    package main
    
    import (
    	"context"
    
    	"github.com/aws/aws-sdk-go/aws"
    	"github.com/aws/aws-sdk-go/aws/session"
    	"github.com/aws/aws-sdk-go/service/timestreamquery"
    	"github.com/aws/aws-xray-sdk-go/xray"
    )
    
    func main() {
    
    	sess := session.Must(session.NewSessionWithOptions(session.Options{
    		SharedConfigState: session.SharedConfigEnable,
    		Config: aws.Config{
    			Region: aws.String("us-east-1"),
    		},
    	}))
    
    	tsclient := timestreamquery.New(sess)
    	xray.AWS(tsclient.Client)
    
    	ctx, _ := xray.BeginSegment(context.Background(), "test")
    	tsclient.QueryWithContext(ctx, &timestreamquery.QueryInput{
    		QueryString: aws.String("SELECT * FROM FOO"),
    	})
    }
    
    

    Possible Solution

    No response

    Additional Information/Context

    No response

    SDK version used

    v1.44.142

    Environment details (Version of Go (go version)? OS name and version, etc.)

    go version go1.19.3 darwin/amd64

    bug needs-triage 
    opened by sportlane 0
  • changelog for v1.44.142 is empty

    changelog for v1.44.142 is empty

    Describe the issue

    The changelog for v1.44.142 is completely empty, as are the GitHub release notes.

    Links

    https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md https://github.com/aws/aws-sdk-go/releases/tag/v1.44.142

    documentation needs-triage 
    opened by rittneje 0
  • Mismatched and Unclear Doc on How to use InstanceProfile's Credential

    Mismatched and Unclear Doc on How to use InstanceProfile's Credential

    Describe the bug

    The use case for this issue is

    1. An IAM role is mapped to InstanceProfile, which is associated with an EC2 instance.
    2. The application that runs on this EC2 instance needs to retrieve the credentials of the InstanceProfile, so it can call AWS services such as SQS.

    The AWS SDK Go doc at https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/credentials/ec2rolecreds

    talks about retrieving AWS credentials from Amazon EC2 Instance Roles via Amazon EC2 IMDS. However, there are several issues:

    1. The Go version of its APIs and therefore its usage paradigm are completely different from the Java version as described at https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/auth/InstanceProfileCredentialsProvider.html

    For instance, AWS SDK has InstanceProfileCredentialsProvider in Java. But in Golang, AWS SDK somehow uses imds.New(imds.Options{})

    1. Even for AWS SDK Go, its documentation is not clear

    For instance,

    provider := imds.New(imds.Options{})

    What is imds ? And how does imds.Options{} indicate that it uses EC2 Instance role ?

    Expected Behavior

    Long-term Fix: The AWS SDK APIs and usage paradigm should be consistent across programming languages. The only difference should be syntax differences in the programming languages.

    Short-term Fix: provide clear explanation of what IMDS means and how imds.Options{} indicate that it uses EC2 Instance role.

    Current Behavior

    Please see description.

    Reproduction Steps

    Please see description.

    Possible Solution

    Long-term Fix: The AWS SDK APIs and usage paradigm should be consistent across programming languages. The only difference should be syntax differences in the programming languages.

    Short-term Fix: provide clear explanation of what IMDS means and how imds.Options{} indicate that it uses EC2 Instance role.

    Additional Information/Context

    No response

    SDK version used

    1.44.137

    Environment details (Version of Go (go version)? OS name and version, etc.)

    1.19

    bug 
    opened by michaelmnguyen 3
  • Update `processcreds.CredentialProcessResponse` visibility to public

    Update `processcreds.CredentialProcessResponse` visibility to public

    In order to have a canonical type for encoding/decoding JSON for a credential process, the visibility of this type needed to be public. This type has been detailed in official AWS CLI documentation and is effectively part of the tooling ecosystem's external interface.

    opened by joshdk 1
  • How to create eks client by AKSK and customize expiration?

    How to create eks client by AKSK and customize expiration?

    Describe the bug

    I can create clientSet using this code,but it expire after 15min.

    Expected Behavior

    I need use clientSet for long time, so I wish it never expire

    Current Behavior

    Unauthorized

    Reproduction Steps

    func GetClientByAKSK() (*kubernetes.Clientset, error) {
    	sess, err := session.NewSession(&aws.Config{
    		Region:      aws.String("MY_REGION"),
    		Credentials: credentials.NewStaticCredentials("MY_AK", "MY_SK", ""),
    	})
    	if err != nil {
    		return nil, err
    	}
    
    	eksSvc := eks.New(sess)
    
    	input := &eks.DescribeClusterInput{
    		Name: aws.String("MY_CLUSTERNAME"),
    	}
    	result, err := eksSvc.DescribeCluster(input)
    	if err != nil {
    		return nil, err
    	}
    
    	gen, err := token.NewGenerator(true, false)
    	if err != nil {
    		return nil, err
    	}
    	opts := &token.GetTokenOptions{
    		ClusterID: aws.StringValue(result.Cluster.Name),
    		Session:   sess,
    	}
    	tok, err := gen.GetWithOptions(opts)
    	if err != nil {
    		return nil, err
    	}
    	ca, err := base64.StdEncoding.DecodeString(aws.StringValue(result.Cluster.CertificateAuthority.Data))
    	if err != nil {
    		return nil, err
    	}
    
    	kubeConfig := &rest.Config{
    		Host:        aws.StringValue(result.Cluster.Endpoint),
    		BearerToken: tok.Token,
    		TLSClientConfig: rest.TLSClientConfig{
    			CAData: ca,
    		},
    	}
    
    	clientSet, err := kubernetes.NewForConfig(kubeConfig)
    	if err != nil {
    		return nil, err
    	}
    
    	return clientSet, nil
    }
    

    Possible Solution

    No response

    Additional Information/Context

    No response

    SDK version used

    sigs.k8s.io/aws-iam-authenticator v0.6.0 github.com/aws/aws-sdk-go v1.44.107

    Environment details (Version of Go (go version)? OS name and version, etc.)

    linux go 1.18

    bug needs-triage 
    opened by lokichoggio 2
Releases(v1.44.146)
  • v1.44.146(Nov 28, 2022)

    Release v1.44.146 (2022-11-28)

    Service Client Updates

    • service/backup: Updates service API, documentation, and paginators
    • service/drs: Updates service API and documentation
    • service/ecs: Updates service API, documentation, and paginators
      • This release adds support for ECS Service Connect, a new capability that simplifies writing and operating resilient distributed applications. This release updates the TaskDefinition, Cluster, Service mutation APIs with Service connect constructs and also adds a new ListServicesByNamespace API.
    • service/elasticfilesystem: Updates service API and documentation
      • This release adds elastic as a new ThroughputMode value for EFS file systems and adds AFTER_1_DAY as a value for TransitionToIARules.
    • service/iot: Updates service API and documentation
      • Job scheduling enables the scheduled rollout of a Job with start and end times and a customizable end behavior when end time is reached. This is available for continuous and snapshot jobs. Added support for MQTT5 properties to AWS IoT TopicRule Republish Action.
    • service/iot-data: Updates service API and documentation
    • service/iotwireless: Updates service API and documentation
    • service/kendra: Updates service API and documentation
      • Amazon Kendra now supports preview of table information from HTML tables in the search results. The most relevant cells with their corresponding rows, columns are displayed as a preview in the search result. The most relevant table cell or cells are also highlighted in table preview.
    • service/logs: Updates service API and documentation
      • Updates to support CloudWatch Logs data protection and CloudWatch cross-account observability
    • service/mgn: Updates service API, documentation, and paginators
    • service/monitoring: Updates service API, documentation, and paginators
      • Adds cross-account support to the GetMetricData API. Adds cross-account support to the ListMetrics API through the usage of the IncludeLinkedAccounts flag and the new OwningAccounts field.
    • service/oam: Updates service API, documentation, paginators, and examples
    • service/organizations: Updates service API and documentation
      • This release introduces delegated administrator for AWS Organizations, a new feature to help you delegate the management of your Organizations policies, enabling you to govern your AWS organization in a decentralized way. You can now allow member accounts to manage Organizations policies.
    • service/rds: Updates service API, documentation, waiters, paginators, and examples
      • This release enables new Aurora and RDS feature called Blue/Green Deployments that makes updates to databases safer, simpler and faster.
    • service/textract: Updates service API and documentation
    • service/transcribe: Updates service API and documentation
    • service/transcribe-streaming: Updates service API and documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.44.145(Nov 23, 2022)

    Release v1.44.145 (2022-11-23)

    Service Client Updates

    • service/grafana: Updates service API and documentation
    • service/rbin: Updates service API and documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.44.144(Nov 22, 2022)

    Release v1.44.144 (2022-11-22)

    Service Client Updates

    • service/appflow: Updates service API and documentation
    • service/kinesisanalyticsv2: Updates service API and documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.44.143(Nov 21, 2022)

    Release v1.44.143 (2022-11-21)

    Service Client Updates

    • service/route53: Updates service API
      • Amazon Route 53 now supports the Asia Pacific (Hyderabad) Region (ap-south-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.142(Nov 18, 2022)

  • v1.44.141(Nov 18, 2022)

    Release v1.44.141 (2022-11-18)

    Service Client Updates

    • service/appflow: Updates service API and documentation
    • service/auditmanager: Updates service API and documentation
    • service/chime-sdk-voice: Adds new service
    • service/cloudfront: Updates service API and documentation
      • CloudFront API support for staging distributions and associated traffic management policies.
    • service/connect: Updates service API and documentation
    • service/dynamodb: Updates service API, documentation, waiters, paginators, and examples
      • Updated minor fixes for DynamoDB documentation.
    • service/ec2: Updates service API and documentation
      • This release adds support for copying an Amazon Machine Image's tags when copying an AMI.
    • service/glue: Updates service API and documentation
      • AWSGlue Crawler - Adding support for Table and Column level Comments with database level datatypes for JDBC based crawler.
    • service/iot-roborunner: Adds new service
    • service/quicksight: Updates service API, documentation, and paginators
      • This release adds the following: 1) Asset management for centralized assets governance 2) QuickSight Q now supports public embedding 3) New Termination protection flag to mitigate accidental deletes 4) Athena data sources now accept a custom IAM role 5) QuickSight supports connectivity to Databricks
    • service/sagemaker: Updates service API and documentation
      • Added DisableProfiler flag as a new field in ProfilerConfig
    • service/servicecatalog: Updates service API and documentation
      • This release 1. adds support for Principal Name Sharing with Service Catalog portfolio sharing. 2. Introduces repo sourced products which are created and managed with existing SC APIs. These products are synced to external repos and auto create new product versions based on changes in the repo.
    • service/ssm-sap: Updates service API, documentation, paginators, and examples
    • service/states: Updates service API and documentation
      • This release adds support for using Step Functions service integrations to invoke any cross-account AWS resource, even if that service doesn't support resource-based policies or cross-account calls. See https://docs.aws.amazon.com/step-functions/latest/dg/concepts-access-cross-acct-resources.html
    • service/streams.dynamodb: Updates service documentation
    • service/transfer: Updates service API and documentation
      • Adds a NONE encryption algorithm type to AS2 connectors, providing support for skipping encryption of the AS2 message body when a HTTPS URL is also specified.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.140(Nov 17, 2022)

    Release v1.44.140 (2022-11-17)

    Service Client Updates

    • service/amplify: Updates service API and documentation
    • service/appflow: Updates service API and documentation
    • service/appsync: Updates service API and documentation
    • service/dms: Updates service API and documentation
      • Adds support for Internet Protocol Version 6 (IPv6) on DMS Replication Instances
    • service/ec2: Updates service API and documentation
      • This release adds a new optional parameter "privateIpAddress" for the CreateNatGateway API. PrivateIPAddress will allow customers to select a custom Private IPv4 address instead of having it be auto-assigned.
    • service/elasticloadbalancingv2: Updates service documentation
    • service/emr-serverless: Updates service API and documentation
    • service/ivschat: Updates service API, documentation, and paginators
    • service/lambda: Updates service API and documentation
      • Add Node 18 (nodejs18.x) support to AWS Lambda.
    • service/personalize: Updates service API, documentation, and paginators
    • service/polly: Updates service API
      • Add two new neural voices - Ola (pl-PL) and Hala (ar-AE).
    • service/rum: Updates service API and documentation
    • service/s3control: Updates service API and documentation
      • Added 34 new S3 Storage Lens metrics to support additional customer use cases.
    • service/secretsmanager: Updates service documentation
      • Documentation updates for Secrets Manager.
    • service/securityhub: Updates service API and documentation
    • service/servicecatalog-appregistry: Updates service API and documentation
    • service/sts: Updates service documentation
      • Documentation updates for AWS Security Token Service.
    • service/textract: Updates service API and documentation
    • service/workspaces: Updates service API and documentation
      • The release introduces CreateStandbyWorkspaces, an API that allows you to create standby WorkSpaces associated with a primary WorkSpace in another Region. DescribeWorkspaces now includes related WorkSpaces properties. DescribeWorkspaceBundles and CreateWorkspaceBundle now return more bundle details.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.139(Nov 16, 2022)

    Release v1.44.139 (2022-11-16)

    Service Client Updates

    • service/batch: Updates service documentation
      • Documentation updates related to Batch on EKS
    • service/billingconductor: Updates service API and documentation
    • service/cloudformation: Updates service API
      • Added UnsupportedTarget HandlerErrorCode for use with CFN Resource Hooks
    • service/comprehendmedical: Updates service API
    • service/connect: Updates service API and documentation
    • service/eks: Updates service API and documentation
    • service/elasticache: Updates service API and documentation
      • for Redis now supports AWS Identity and Access Management authentication access to Redis clusters starting with redis-engine version 7.0
    • service/iottwinmaker: Updates service API, documentation, and paginators
    • service/personalize-events: Updates service API and documentation
    • service/proton: Updates service API and documentation
    • service/rds: Updates service API, documentation, waiters, paginators, and examples
      • This release adds support for container databases (CDBs) to Amazon RDS Custom for Oracle. A CDB contains one PDB at creation. You can add more PDBs using Oracle SQL. You can also customize your database installation by setting the Oracle base, Oracle home, and the OS user name and group.
    • service/ssm: Updates service API, documentation, and paginators
      • This release adds support for cross account access in CreateOpsItem, UpdateOpsItem and GetOpsItem. It introduces new APIs to setup resource policies for SSM resources: PutResourcePolicy, GetResourcePolicies and DeleteResourcePolicy.
    • service/ssm-incidents: Updates service API and documentation
    • service/transfer: Updates service API
      • Allow additional operations to throw ThrottlingException
    • service/xray: Updates service API, documentation, and paginators
      • This release adds new APIs - PutResourcePolicy, DeleteResourcePolicy, ListResourcePolicies for supporting resource based policies for AWS X-Ray.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.138(Nov 15, 2022)

    Release v1.44.138 (2022-11-15)

    Service Client Updates

    • service/connect: Updates service API
    • service/greengrassv2: Updates service API and documentation
    • service/route53: Updates service API
      • Amazon Route 53 now supports the Europe (Spain) Region (eu-south-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region.
    • service/ssmsap: Updates service API, documentation, paginators, and examples
    • service/workspaces: Updates service API and documentation
      • This release introduces ModifyCertificateBasedAuthProperties, a new API that allows control of certificate-based auth properties associated with a WorkSpaces directory. The DescribeWorkspaceDirectories API will now additionally return certificate-based auth properties in its responses.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.137(Nov 14, 2022)

    Release v1.44.137 (2022-11-14)

    Service Client Updates

    • service/customer-profiles: Updates service API and documentation
    • service/lakeformation: Updates service API and documentation
    • service/managedblockchain: Updates service documentation
    • service/proton: Updates service API and documentation
    • service/rds: Updates service API, documentation, waiters, paginators, and examples
      • This release adds support for restoring an RDS Multi-AZ DB cluster snapshot to a Single-AZ deployment or a Multi-AZ DB instance deployment.
    • service/workdocs: Updates service API and documentation
      • Added 2 new document related operations, DeleteDocumentVersion and RestoreDocumentVersions.
    • service/xray: Updates service API and documentation
      • This release enhances GetServiceGraph API to support new type of edge to represent links between SQS and Lambda in event-driven applications.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.136(Nov 11, 2022)

    Release v1.44.136 (2022-11-11)

    Service Client Updates

    • service/glue: Updates service documentation
      • Added links related to enabling job bookmarks.
    • service/iot: Updates service API and documentation
      • This release add new api listRelatedResourcesForAuditFinding and new member type IssuerCertificates for Iot device device defender Audit.
    • service/license-manager: Updates service API and documentation
    • service/marketplace-catalog: Updates service API and documentation
    • service/rekognition: Updates service API and documentation
      • Adding support for ImageProperties feature to detect dominant colors and image brightness, sharpness, and contrast, inclusion and exclusion filters for labels and label categories, new fields to the API response, "aliases" and "categories"
    • service/securityhub: Updates service documentation
    • service/ssm-incidents: Updates service API and documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.44.135(Nov 10, 2022)

    Release v1.44.135 (2022-11-10)

    Service Client Updates

    • service/autoscaling: Updates service documentation
      • This release adds a new price capacity optimized allocation strategy for Spot Instances to help customers optimize provisioning of Spot Instances via EC2 Auto Scaling, EC2 Fleet, and Spot Fleet. It allocates Spot Instances based on both spare capacity availability and Spot Instance price.
    • service/ec2: Updates service API and documentation
      • This release adds a new price capacity optimized allocation strategy for Spot Instances to help customers optimize provisioning of Spot Instances via EC2 Auto Scaling, EC2 Fleet, and Spot Fleet. It allocates Spot Instances based on both spare capacity availability and Spot Instance price.
    • service/ecs: Updates service API, documentation, and examples
      • This release adds support for task scale-in protection with updateTaskProtection and getTaskProtection APIs. UpdateTaskProtection API can be used to protect a service managed task from being terminated by scale-in events and getTaskProtection API to get the scale-in protection status of a task.
    • service/es: Updates service API and documentation
      • Amazon OpenSearch Service now offers managed VPC endpoints to connect to your Amazon OpenSearch Service VPC-enabled domain in a Virtual Private Cloud (VPC). This feature allows you to privately access OpenSearch Service domain without using public IPs or requiring traffic to traverse the Internet.
    • service/resource-explorer-2: Updates service documentation
    • service/scheduler: Updates service API, documentation, paginators, and examples
    Source code(tar.gz)
    Source code(zip)
  • v1.44.134(Nov 9, 2022)

    Release v1.44.134 (2022-11-09)

    Service Client Updates

    • service/connect: Updates service API and documentation
    • service/connectcases: Updates service API and documentation
    • service/ec2: Updates service API
      • Amazon EC2 Trn1 instances, powered by AWS Trainium chips, are purpose built for high-performance deep learning training. u-24tb1.112xlarge and u-18tb1.112xlarge High Memory instances are purpose-built to run large in-memory databases.
    • service/groundstation: Updates service API, documentation, and paginators
    • service/mediapackage-vod: Updates service API and documentation
    • service/transcribe-streaming: Updates service API and documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.44.133(Nov 8, 2022)

    Release v1.44.133 (2022-11-08)

    Service Client Updates

    • service/acm: Updates service API and documentation
      • Support added for requesting elliptic curve certificate key algorithm types P-256 (EC_prime256v1) and P-384 (EC_secp384r1).
    • service/billingconductor: Updates service API, documentation, and paginators
    • service/ec2: Updates service API and documentation
      • This release enables sharing of EC2 Placement Groups across accounts and within AWS Organizations using Resource Access Manager
    • service/fms: Updates service API and documentation
    • service/lightsail: Updates service API and documentation
      • This release adds support for Amazon Lightsail to automate the delegation of domains registered through Amazon Route 53 to Lightsail DNS management and to automate record creation for DNS validation of Lightsail SSL/TLS certificates.
    • service/opensearch: Updates service API and documentation
    • service/polly: Updates service API
      • Amazon Polly adds new voices: Elin (sv-SE), Ida (nb-NO), Laura (nl-NL) and Suvi (fi-FI). They are available as neural voices only.
    • service/resource-explorer-2: Adds new service
    • service/route53: Updates service API and documentation
      • Amazon Route 53 now supports the Europe (Zurich) Region (eu-central-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.132(Nov 7, 2022)

    Release v1.44.132 (2022-11-07)

    Service Client Updates

    • service/athena: Updates service API and documentation
      • Adds support for using Query Result Reuse
    • service/autoscaling: Updates service API and documentation
      • This release adds support for two new attributes for attribute-based instance type selection - NetworkBandwidthGbps and AllowedInstanceTypes.
    • service/cloudtrail: Updates service API and documentation
      • This release includes support for configuring a delegated administrator to manage an AWS Organizations organization CloudTrail trails and event data stores, and AWS Key Management Service encryption of CloudTrail Lake event data stores.
    • service/ec2: Updates service API and documentation
      • This release adds support for two new attributes for attribute-based instance type selection - NetworkBandwidthGbps and AllowedInstanceTypes.
    • service/elasticache: Updates service API and documentation
      • Added support for IPv6 and dual stack for Memcached and Redis clusters. Customers can now launch new Redis and Memcached clusters with IPv6 and dual stack networking support.
    • service/mediaconvert: Updates service API and documentation
      • The AWS Elemental MediaConvert SDK has added support for setting the SDR reference white point for HDR conversions and conversion of HDR10 to DolbyVision without mastering metadata.
    • service/models.lex.v2: Updates service API, documentation, and paginators
    • service/ssm: Updates service API and documentation
      • This release includes support for applying a CloudWatch alarm to multi account multi region Systems Manager Automation
    • service/wafv2: Updates service documentation
    • service/wellarchitected: Updates service API, documentation, and paginators
    • service/workspaces: Updates service API and documentation
      • This release adds protocols attribute to workspaces properties data type. This enables customers to migrate workspaces from PC over IP (PCoIP) to WorkSpaces Streaming Protocol (WSP) using create and modify workspaces public APIs.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.131(Nov 4, 2022)

    Release v1.44.131 (2022-11-04)

    Service Client Updates

    • service/ec2: Updates service API and documentation
      • This release adds API support for the recipient of an AMI account share to remove shared AMI launch permissions.
    • service/emr-containers: Updates service API, documentation, and paginators
    • service/logs: Updates service documentation
      • Doc-only update for bug fixes and support of export to buckets encrypted with SSE-KMS
    Source code(tar.gz)
    Source code(zip)
  • v1.44.130(Nov 3, 2022)

    Release v1.44.130 (2022-11-03)

    Service Client Updates

    • service/memorydb: Updates service API and documentation
    • service/sagemaker: Updates service API
      • Amazon SageMaker now supports running training jobs on ml.trn1 instance types.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.129(Nov 2, 2022)

    Release v1.44.129 (2022-11-02)

    Service Client Updates

    • service/iotsitewise: Updates service API, documentation, and paginators
    • service/s3control: Updates service API and documentation
      • S3 on Outposts launches support for Lifecycle configuration for Outposts buckets. With S3 Lifecycle configuration, you can mange objects so they are stored cost effectively. You can manage objects using size-based rules and specify how many noncurrent versions bucket will retain.
    • service/sagemaker: Updates service API and documentation
      • This release updates Framework model regex for ModelPackage to support new Framework version xgboost, sklearn.
    • service/ssm-incidents: Updates service API and documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.44.128(Nov 1, 2022)

    Release v1.44.128 (2022-11-01)

    Service Client Updates

    • service/rds: Updates service API, documentation, waiters, paginators, and examples
      • Relational Database Service - This release adds support for configuring Storage Throughput on RDS database instances.
    • service/textract: Updates service API and documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.44.127(Oct 31, 2022)

    Release v1.44.127 (2022-10-31)

    Service Client Updates

    • service/apprunner: Updates service API, documentation, and paginators
    • service/connect: Updates service API and documentation
    • service/ec2: Updates service API, documentation, and paginators
      • Elastic IP transfer is a new Amazon VPC feature that allows you to transfer your Elastic IP addresses from one AWS Account to another.
    • service/iot: Updates service API and documentation
      • This release adds the Amazon Location action to IoT Rules Engine.
    • service/logs: Updates service API and documentation
      • SDK release to support tagging for destinations and log groups with TagResource. Also supports tag on create with PutDestination.
    • service/sesv2: Updates service API, documentation, and paginators
    • service/textract: Updates service API and documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.44.126(Oct 28, 2022)

    Release v1.44.126 (2022-10-28)

    Service Client Updates

    • service/apprunner: Updates service API
    • service/appstream: Updates service API and documentation
      • This release includes CertificateBasedAuthProperties in CreateDirectoryConfig and UpdateDirectoryConfig.
    • service/cloud9: Updates service documentation
      • Update to the documentation section of the Cloud9 API Reference guide.
    • service/cloudformation: Updates service API and documentation
      • This release adds more fields to improves visibility of AWS CloudFormation StackSets information in following APIs: ListStackInstances, DescribeStackInstance, ListStackSetOperationResults, ListStackSetOperations, DescribeStackSetOperation.
    • service/gamesparks: Updates service API
    • service/mediatailor: Updates service API and documentation
    • service/privatenetworks: Adds new service
    • service/support-app: Adds new service
    Source code(tar.gz)
    Source code(zip)
  • v1.44.125(Oct 27, 2022)

    Release v1.44.125 (2022-10-27)

    Service Client Updates

    • service/ec2: Updates service API and documentation
      • Feature supports the replacement of instance root volume using an updated AMI without requiring customers to stop their instance.
    • service/fms: Updates service API and documentation
    • service/glue: Updates service API and documentation
      • Added support for custom datatypes when using custom csv classifier.
    • service/redshift: Updates service documentation
      • This release clarifies use for the ElasticIp parameter of the CreateCluster and RestoreFromClusterSnapshot APIs.
    • service/sagemaker: Updates service API and documentation
      • This change allows customers to provide a custom entrypoint script for the docker container to be run while executing training jobs, and provide custom arguments to the entrypoint script.
    • service/wafv2: Updates service API and documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.44.124(Oct 26, 2022)

    Release v1.44.124 (2022-10-26)

    Service Client Updates

    • service/iam: Updates service documentation
      • Doc only update that corrects instances of CLI not using an entity.
    • service/kafka: Updates service API and documentation
    • service/neptune: Updates service API, documentation, and paginators
      • Added a new cluster-level attribute to set the capacity range for Neptune Serverless instances.
    • service/sagemaker: Updates service API
      • Amazon SageMaker Automatic Model Tuning now supports specifying Grid Search strategy for tuning jobs, which evaluates all hyperparameter combinations exhaustively based on the categorical hyperparameters provided.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.123(Oct 25, 2022)

    Release v1.44.123 (2022-10-25)

    Service Client Updates

    • service/accessanalyzer: Updates service API and documentation
    • service/location: Updates service documentation
    • service/mediatailor: Updates service API, documentation, paginators, and examples
    • service/rds: Updates service API, documentation, waiters, paginators, and examples
      • Relational Database Service - This release adds support for exporting DB cluster data to Amazon S3.
    • service/workspaces: Updates service API and documentation
      • This release adds new enums for supporting Workspaces Core features, including creating Manual running mode workspaces, importing regular Workspaces Core images and importing g4dn Workspaces Core images.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.122(Oct 24, 2022)

    Release v1.44.122 (2022-10-24)

    Service Client Updates

    • service/acm-pca: Updates service API and documentation
    • service/batch: Updates service API and documentation
      • This release adds support for AWS Batch on Amazon EKS.
    • service/datasync: Updates service API and documentation
    • service/sagemaker: Updates service API, documentation, and paginators
      • SageMaker Inference Recommender now supports a new API ListInferenceRecommendationJobSteps to return the details of all the benchmark we create for an inference recommendation job.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.121(Oct 21, 2022)

    Release v1.44.121 (2022-10-21)

    Service Client Updates

    • service/cognito-idp: Updates service API and documentation
    • service/s3: Updates service examples
      • S3 on Outposts launches support for automatic bucket-style alias. You can use the automatic access point alias instead of an access point ARN for any object-level operation in an Outposts bucket.
    • service/sagemaker: Updates service API and documentation
      • CreateInferenceRecommenderjob API now supports passing endpoint details directly, that will help customers to identify the max invocation and max latency they can achieve for their model and the associated endpoint along with getting recommendations on other instances.
    Source code(tar.gz)
    Source code(zip)
  • v1.44.120(Oct 20, 2022)

    Release v1.44.120 (2022-10-20)

    Service Client Updates

    • service/devops-guru: Updates service API and documentation
    • service/globalaccelerator: Updates service API and documentation
    • service/resiliencehub: Updates service API and documentation
    • service/rum: Updates service API, documentation, and paginators
    Source code(tar.gz)
    Source code(zip)
  • v1.44.119(Oct 19, 2022)

    Release v1.44.119 (2022-10-19)

    Service Client Updates

    • service/chime-sdk-messaging: Updates service documentation
    • service/cloudtrail: Updates service API and documentation
      • This release includes support for exporting CloudTrail Lake query results to an Amazon S3 bucket.
    • service/config: Updates service API and documentation
    • service/connect: Updates service API, documentation, and paginators
    • service/eventbridge: Updates service API
    • service/managedblockchain: Updates service API, documentation, and paginators
    • service/s3: Updates service API and examples
      • Updates internal logic for constructing API endpoints. We have added rule-based endpoints and internal model parameters.
    • service/s3control: Updates service API
      • Updates internal logic for constructing API endpoints. We have added rule-based endpoints and internal model parameters.
    • service/support-app: Updates service API and documentation
    • service/workspaces-web: Updates service API, documentation, and paginators

    SDK Enhancements

    • aws/session: Modified config resolution strategy when $HOME or %USERPROFILE% environment variables are not set.
      • When the environment variables are not set, the SDK will attempt to determine the home directory using user.Current().
    Source code(tar.gz)
    Source code(zip)
  • v1.44.118(Oct 18, 2022)

    Release v1.44.118 (2022-10-18)

    Service Client Updates

    • service/frauddetector: Updates service documentation
    • service/sagemaker: Updates service API and documentation
      • This change allows customers to enable data capturing while running a batch transform job, and configure monitoring schedule to monitoring the captured data.
    • service/servicediscovery: Updates service API, documentation, and examples
    • service/sesv2: Updates service API and documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.44.117(Oct 17, 2022)

    Release v1.44.117 (2022-10-17)

    Service Client Updates

    • service/greengrass: Updates service API and documentation
      • This change allows customers to specify FunctionRuntimeOverride in FunctionDefinitionVersion. This configuration can be used if the runtime on the device is different from the AWS Lambda runtime specified for that function.
    • service/sagemaker: Updates service API and documentation
      • This release adds support for C7g, C6g, C6gd, C6gn, M6g, M6gd, R6g, and R6gn Graviton instance types in Amazon SageMaker Inference.
    Source code(tar.gz)
    Source code(zip)
Sample apps and code written for Google Cloud in the Go programming language.

Google Cloud Platform Go Samples This repository holds sample code written in Go that demonstrates the Google Cloud Platform. Some samples have accomp

Google Cloud Platform 3.7k Nov 22, 2022
AWS Lambda to work around index.html S3/CloudFront mess

No more index.html mess with AWS CloudFront/S3 Problem Consider you have a statically generated site — a bunch of usual resources, including html file

Artyom Pervukhin 26 Jun 18, 2022
Browse your AWS ECS Clusters in the Terminal

Browse your AWS ECS Clusters in the Terminal. The ecsview application is a terminal-based UI for browsing Amazon Elastic Container Service (ECS) clust

Jason Swartz 101 Nov 1, 2022
Generate a basic IAM policy from AWS client-side monitoring (CSM)

iamlive Generate a basic IAM policy from AWS client-side monitoring (CSM) Installation Pre-built binaries Pre-built binaries for Windows, macOS and Li

Ian Mckay 2.2k Nov 24, 2022
AWS plugin for Steampipe

Use SQL to query IAM users, EC2 instances and more from your AWS account.

Turbot 112 Nov 24, 2022
This example shows how to serve private contents on AWS S3 through CloudFront signed URL.

AWS CloudFront with Signed URL This is the repository of my blog post. This example shows how to serve private contents on AWS S3 through CloudFront s

Hao-Ming, Hsu 7 Oct 19, 2022
Go language interface to Swift / Openstack Object Storage / Rackspace cloud files (golang)

Swift This package provides an easy to use library for interfacing with Swift / Openstack Object Storage / Rackspace cloud files from the Go Language

Nick Craig-Wood 294 Nov 9, 2022
AWS SDK for the Go programming language.

AWS SDK for Go aws-sdk-go is the official AWS SDK for the Go programming language. Checkout our release notes for information about the latest bug fix

Amazon Web Services 8k Nov 29, 2022
Nextengine-sdk-go: the NextEngine SDK for the Go programming language

NextEngine SDK for Go nextengine-sdk-go is the NextEngine SDK for the Go programming language. Getting Started Install go get github.com/takaaki-s/nex

null 0 Dec 7, 2021
Floppa programming language inspired by the brainf*ck programming language. Created just for fun and you can convert your brainf*ck code to floppa code.

Floppa Programming Language Created just for fun. But if you want to contribute, why not? Floppa p.l. inspired by the brainf*ck programming language.

null 19 Oct 20, 2022
T# Programming Language. Something like Porth, Forth but written in Go. Stack-oriented programming language.

The T# Programming Language WARNING! THIS LANGUAGE IS A WORK IN PROGRESS! ANYTHING CAN CHANGE AT ANY MOMENT WITHOUT ANY NOTICE! Something like Forth a

T# 92 Jun 29, 2022
Yayx programming language is begginer friendly programming language.

Yayx Yayx programming language is begginer friendly programming language. What have yayx: Easy syntax Dynamic types Can be compiled to outhers program

null 1 Dec 27, 2021
Yayx programming language is begginer friendly programming language.

Yayx Yayx programming language is begginer friendly programming language. What have yayx: Easy syntax Dynamic types Can be compiled to outhers program

Yayx Programming Language 7 May 20, 2022
Simple no frills AWS S3 Golang Library using REST with V4 Signing (without AWS Go SDK)

simples3 : Simple no frills AWS S3 Library using REST with V4 Signing Overview SimpleS3 is a golang library for uploading and deleting objects on S3 b

Rohan Verma 95 Nov 4, 2022
A package for access aws service using AWS SDK for Golang

goaws ?? A package for access aws service using AWS SDK for Golang Advantage with goaws package Example for get user list IAM with AWS SDK for Golang

Muhammad Ichsanul Fadhil 1 Nov 25, 2021
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.

Advent of Code 2021 Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved

Kemal Ogun Isik 0 Dec 2, 2021
Zach Howell 0 Jan 4, 2022
A repository for showcasing my knowledge of the Google Go (2009) programming language, and continuing to learn the language.

Learning Google Golang (programming language) Not to be confused with the Go! programming language by Francis McCabe I don't know very much about the

Sean P. Myrick V19.1.7.2 2 Nov 6, 2022
A repository for showcasing my knowledge of the Go! (2003) programming language, and continuing to learn the language.

Learning Go! (programming language) Not to be confused with Google Golang (2009) I don't know too much about the Go! programming language, but I know

Sean P. Myrick V19.1.7.2 2 Oct 22, 2022
Run the same Docker images in AWS Lambda and AWS ECS

serverlessish tl;dr Run the exact same image for websites in Lambda as you do in ECS, Kubernetes, etc. Just add this to your Dockerfile, listen on por

Glass Echidna 182 Sep 18, 2022