Skip to main content

S3 Object

caution

This page is a work in progress. If you want to help us to make this page better, please consider contributing on GitHub.

AWS Documentation

Example

import middy from '@middy/core'
import s3ObjectResponseMiddleware from '@middy/s3-object-response'
import {captureAWSv3Client, captureHTTPsGlobal} from 'aws-xray-sdk-core'

export const handler = middy()
.use(s3ObjectResponseMiddleware({
awsClientCapture: captureAWSv3Client,
httpsCapture: captureHTTPsGlobal,
bodyType: 'promise'
}))
.handler((event, context, {signal}) => {
// ...
})