From b7a3900b5adb635be1c6e5d3161276a1187b17b6 Mon Sep 17 00:00:00 2001 From: msm1992 Date: Wed, 31 May 2023 04:27:22 +0530 Subject: [PATCH 1/2] Add velocity xml changes to support lambda content encoding --- .../distribution/resources/api_templates/velocity_template.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/distribution/resources/api_templates/velocity_template.xml b/modules/distribution/resources/api_templates/velocity_template.xml index ec168cf1a3..97cfe0a5d0 100644 --- a/modules/distribution/resources/api_templates/velocity_template.xml +++ b/modules/distribution/resources/api_templates/velocity_template.xml @@ -253,6 +253,7 @@ $in_sequences.get("$resource.getUriTemplate()").get($uri) #set( $roleRegion = $!{endpoint_config.get("amznRoleRegion")} ) #set( $resourceName = $!{resource.getAmznResourceName()} ) #set( $resourceTimeout = $!{resource.getAmznResourceTimeout()} ) + #set( $isContentEncodingEnabled = $!{resource.isAmznResourceContentEncoded()} ) #if( $accessKey != '' ) @@ -282,6 +283,7 @@ $in_sequences.get("$resource.getUriTemplate()").get($uri) #if( $resourceTimeout != '' ) #end + ## AWS Lambda: end From c6466d1ea91212ad37ddc5f632ae3e4ef4af9fec Mon Sep 17 00:00:00 2001 From: msm1992 Date: Wed, 31 May 2023 09:59:41 +0530 Subject: [PATCH 2/2] Check whether isContentEncodingEnabled is empty --- .../distribution/resources/api_templates/velocity_template.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/distribution/resources/api_templates/velocity_template.xml b/modules/distribution/resources/api_templates/velocity_template.xml index 97cfe0a5d0..4732d712ef 100644 --- a/modules/distribution/resources/api_templates/velocity_template.xml +++ b/modules/distribution/resources/api_templates/velocity_template.xml @@ -283,7 +283,9 @@ $in_sequences.get("$resource.getUriTemplate()").get($uri) #if( $resourceTimeout != '' ) #end + #if( $isContentEncodingEnabled != '' ) + #end ## AWS Lambda: end