Skip to content

Commit

Permalink
- Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennenoel committed Dec 2, 2023
1 parent 72a81a5 commit d940183
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/aws/src/clients/s3.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class S3Client implements S3ClientInterface {
Key: key,
})
try {
return this.getClient().send(command);
return await this.getClient().send(command);
} catch (e) {
this.logHandler.error("Error getting object from S3", {error: e}, AwsModuleKeyname);
throw e;
Expand Down
9 changes: 8 additions & 1 deletion packages/aws/src/interfaces/s3-client.interface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {S3PresignedOperationTypeEnum} from "../enums/s3-presigned-operation-type.enum";
import {S3Client as AWSS3Client, S3ClientConfig} from "@aws-sdk/client-s3";
import {S3Client as AWSS3Client, S3ClientConfig, GetObjectCommandOutput} from "@aws-sdk/client-s3";

/**
* The S3Client Interface defines the methods that an S3 client must implement.
Expand All @@ -17,6 +17,13 @@ export interface S3ClientInterface {
*/
setClient(config: S3ClientConfig);

/**
* Retrieves the key from the S3 Bucket.
* @param bucketName
* @param key
*/
get(bucketName: string, key: string): Promise<GetObjectCommandOutput>

/**
* Gets an object's body as an array buffer from S3.
* @param bucketName The bucket name where to get the object.
Expand Down

0 comments on commit d940183

Please sign in to comment.