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 {captureAWSClient, captureHTTPsGlobal} from 'aws-xray-sdk-core'

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