Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insufficient documentation of NewStaticCredentials #3162

Closed
tcurdt opened this issue Feb 22, 2020 · 2 comments · Fixed by #3185
Closed

Insufficient documentation of NewStaticCredentials #3162

tcurdt opened this issue Feb 22, 2020 · 2 comments · Fixed by #3185
Labels
documentation This is a problem with documentation.

Comments

@tcurdt
Copy link

tcurdt commented Feb 22, 2020

Version of AWS SDK for Go?

github.com/aws/aws-sdk-go v1.29.3

Version of Go (go version)?

go version go1.13.8 darwin/amd64

What issue did you see?

I am trying to authenticate but cannot use env variables or files to pass the credentials. This should be doable using NewStaticCredentials(id, secret, token string) *Credentials but there is no explanation at all what the token is or where to obtain it from.

Someone else asked the same thing on StackOverflow and this was raise before on another issue.

Please improve the documentation clarifying that token can be an empty string.
Even better yet - provide a method signature without a token.

@diehlaws diehlaws self-assigned this Feb 26, 2020
@diehlaws diehlaws added the documentation This is a problem with documentation. label Feb 26, 2020
@diehlaws
Copy link
Contributor

Hi @tcurdt, thanks for your feedback on this matter. The token parameter for this function is used when providing temporary security credentials to your service client that can be retrieved from STS (e.g. via a GetSessionToken request).

While this is mentioned in the SDK's developer guide, mentioning what this token is in the SDK's API Reference and clarifying that it is not required for all static credentials would certainly help reduce confusion in this matter. We will work on updating this soon.

@tcurdt
Copy link
Author

tcurdt commented Feb 26, 2020

Much appreciated, @diehlaws. Thanks!

aws-sdk-go-automation pushed a commit that referenced this issue Mar 10, 2020
===

### Service Client Updates
* `service/ec2`: Updates service API and documentation
  * Documentation updates for EC2
* `service/iotevents`: Updates service API and documentation
* `service/marketplacecommerceanalytics`: Updates service documentation
  * Change the disbursement data set to look past 31 days instead until the beginning of the month.
* `service/serverlessrepo`: Updates service API and documentation

### SDK Enhancements
* `aws/credentials`: Clarify `token` usage in `NewStaticCredentials` documentation.
  * Related to [#3162](#3162).
* `service/s3/s3manager`: Improve memory allocation behavior by replacing sync.Pool with custom pool implementation ([#3183](#3183))
  * Improves memory allocations that occur when the provided `io.Reader` to upload does not satisfy both the `io.ReaderAt` and `io.ReadSeeker` interfaces.
  * Fixes [#3075](#3075)
aws-sdk-go-automation added a commit that referenced this issue Mar 10, 2020
Release v1.29.21 (2020-03-10)
===

### Service Client Updates
* `service/ec2`: Updates service API and documentation
  * Documentation updates for EC2
* `service/iotevents`: Updates service API and documentation
* `service/marketplacecommerceanalytics`: Updates service documentation
  * Change the disbursement data set to look past 31 days instead until the beginning of the month.
* `service/serverlessrepo`: Updates service API and documentation

### SDK Enhancements
* `aws/credentials`: Clarify `token` usage in `NewStaticCredentials` documentation.
  * Related to [#3162](#3162).
* `service/s3/s3manager`: Improve memory allocation behavior by replacing sync.Pool with custom pool implementation ([#3183](#3183))
  * Improves memory allocations that occur when the provided `io.Reader` to upload does not satisfy both the `io.ReaderAt` and `io.ReadSeeker` interfaces.
  * Fixes [#3075](#3075)
@diehlaws diehlaws removed their assignment Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation This is a problem with documentation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants