@@ -40,6 +40,18 @@ export interface S3IntegrationProps {
4040 * @default - a combination of IntegrationResponseSets.defaultPassthrough() and IntegrationResponseSets.s3JsonErrorMessage()
4141 */
4242 readonly integrationResponseSet ?: IntegrationResponseSet ;
43+
44+ /**
45+ * Specifies additional query string request parameters to be passed to the integration request.
46+ * @default - no additional query string request parameters
47+ */
48+ readonly queryStringRequestParameters ?: string [ ] ;
49+
50+ /**
51+ * Specifies additional header request parameters to be passed to the integration request.
52+ * @default - no additional header request parameters
53+ */
54+ readonly headerRequestParameters ?: string [ ] ;
4355}
4456
4557/**
@@ -51,6 +63,9 @@ export class S3Integration extends Integration {
5163 private readonly method ?: Method ;
5264 private readonly path ?: string ;
5365 private readonly integrationResponseSet ?: IntegrationResponseSet ;
66+ private readonly additionalRequestParameters ?: {
67+ [ property : string ] : string ;
68+ } ;
5469
5570 private readonly executionRoleId = "S3IntegrationsExecutionRole" ;
5671
@@ -61,6 +76,16 @@ export class S3Integration extends Integration {
6176 this . method = props . method ;
6277 this . path = props . path ;
6378 this . integrationResponseSet = props . integrationResponseSet ;
79+ this . additionalRequestParameters = Object . fromEntries ( [
80+ ...( props . queryStringRequestParameters ?? [ ] ) . map ( ( param ) => [
81+ `integration.request.path.${ param } ` ,
82+ `method.request.querystring.${ param } ` ,
83+ ] ) ,
84+ ...( props . headerRequestParameters ?? [ ] ) . map ( ( header ) => [
85+ `integration.request.path.${ header } ` ,
86+ `method.request.header.${ header } ` ,
87+ ] ) ,
88+ ] ) ;
6489 }
6590
6691 private isRole ( construct : IConstruct ) : construct is IRole {
@@ -102,6 +127,7 @@ export class S3Integration extends Integration {
102127 `method.request.path.${ param } ` ,
103128 ] )
104129 ) ,
130+ ...this . additionalRequestParameters ,
105131 } ,
106132 responses : {
107133 ...(
0 commit comments