(config: S3DestinationConfig, credentials: S3DestinationCredentials)
| 105 | export type S3DestinationCredentials = z.infer<typeof s3CredentialsSchema> |
| 106 | |
| 107 | function buildClient(config: S3DestinationConfig, credentials: S3DestinationCredentials): S3Client { |
| 108 | return new S3Client({ |
| 109 | region: config.region, |
| 110 | credentials: { |
| 111 | accessKeyId: credentials.accessKeyId, |
| 112 | secretAccessKey: credentials.secretAccessKey, |
| 113 | }, |
| 114 | endpoint: config.endpoint, |
| 115 | forcePathStyle: config.forcePathStyle ?? false, |
| 116 | }) |
| 117 | } |
| 118 | |
| 119 | function isS3ServiceException(error: unknown): error is S3ServiceException { |
| 120 | return ( |
no outgoing calls