Skip to content

[TypeScript] Allow the service configuration credentials to be nulled #1367

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

Merged
merged 1 commit into from
Feb 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changes/next-release/bugfix-TypeScript-b03c57a6.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "bugfix",
"category": "TypeScript",
"description": "Enable the configuration credentials to be nulled so that the global config is not used."
}
2 changes: 1 addition & 1 deletion lib/config.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export abstract class ConfigurationOptions {
/**
* The AWS credentials to sign requests with.
*/
credentials?: Credentials|CredentialsOptions
credentials?: Credentials|CredentialsOptions|null
/**
* The provider chain used to resolve credentials if no static credentials property is set.
*/
Expand Down
5 changes: 5 additions & 0 deletions ts/s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import {Endpoint} from '../lib/endpoint';
// Instantiate S3 without options
var s3 = new S3();

// Instantiate S3 without using the global credentials
new S3({
credentials: null
});

// Instantiate S3 with config
var s3Config: S3.Types.ClientConfiguration = {
apiVersion: '2006-03-01',
Expand Down