-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: use sdkv3 #47
feat: use sdkv3 #47
Conversation
process.env.AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE = '1'; | ||
this.config = { | ||
clientConfig, | ||
credentials: fromNodeProviderChain({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this is a big improvement over random env vars
|
||
return upload.done(); | ||
} catch (e) { | ||
// TODO: add something more useful here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
todo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add something here before I remove the release candidate tag. I need to actually test the failure modes in the CLI to figure out what will be useful information here.
return true; | ||
} catch (e: any) { | ||
if (e.code !== 'ImageNotFoundException') { | ||
if (e.name !== 'ImageNotFoundException') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the change from code
to name
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SDK v3 updated the error class as such that code is no longer a field and name is the replacement for it. No idea why they did that ¯_(ツ)_/¯
lib/private/handlers/files.ts
Outdated
@@ -130,7 +131,7 @@ export class FileAssetHandler implements IAssetHandler { | |||
paramsEncryption | |||
); | |||
|
|||
await s3.upload(params).promise(); | |||
await this.host.aws.upload(params, {}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make the second parameter optional?
Co-authored-by: Calvin Combs <[email protected]>
Co-authored-by: Calvin Combs <[email protected]>
This updates usage of the sdk to sdkv3 and begins publishing it on a new major version. For the moment we will publish these as release candidates until we are sure of stability.