diff --git a/lib/plugins/aws/package/compile/events/httpApi/index.js b/lib/plugins/aws/package/compile/events/httpApi/index.js index 43b6fad6580..57bfa7806fe 100644 --- a/lib/plugins/aws/package/compile/events/httpApi/index.js +++ b/lib/plugins/aws/package/compile/events/httpApi/index.js @@ -478,18 +478,11 @@ Object.defineProperties( const providerConfig = this.serverless.service.provider; const userConfig = providerConfig.httpApi || {}; - if (!userConfig.payload) { - this.serverless._logDeprecation( - 'AWS_HTTP_API_VERSION', - 'Default HTTP API Payload version will be switched to 2.0 with next major release. Configure "httpApi.payload" explicitly to hide this message.' - ); - } - const properties = { ApiId: this.getApiIdConfig(), IntegrationType: 'AWS_PROXY', IntegrationUri: resolveTargetConfig(routeTargetData), - PayloadFormatVersion: userConfig.payload || '1.0', + PayloadFormatVersion: userConfig.payload || '2.0', }; if (routeTargetData.timeout) { properties.TimeoutInMillis = Math.round(routeTargetData.timeout * 1000); diff --git a/lib/plugins/aws/package/compile/events/httpApi/index.test.js b/lib/plugins/aws/package/compile/events/httpApi/index.test.js index ac152b23307..cc9a7e3c4ac 100644 --- a/lib/plugins/aws/package/compile/events/httpApi/index.test.js +++ b/lib/plugins/aws/package/compile/events/httpApi/index.test.js @@ -77,7 +77,7 @@ describe('HttpApiEvents', () => { const resource = cfResources[naming.getHttpApiIntegrationLogicalId('foo')]; expect(resource.Type).to.equal('AWS::ApiGatewayV2::Integration'); expect(resource.Properties.IntegrationType).to.equal('AWS_PROXY'); - expect(resource.Properties.PayloadFormatVersion).to.equal('1.0'); + expect(resource.Properties.PayloadFormatVersion).to.equal('2.0'); }); it('Should ensure higher timeout than function', () => { const resource = cfResources[naming.getHttpApiIntegrationLogicalId('foo')];