@certenza/aws-cdk-infrastructure-commons 2.4.1 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -126,6 +126,9 @@ const createHttpApiGateway = (scope, apiName, domainName, hostedZoneId, zoneName
126
126
  description: `Public HTTP API Gateway for ${apiName}`,
127
127
  defaultDomainMapping: {
128
128
  domainName: apiDomainName,
129
+ // Explicitly set mappingKey to empty string for root path mapping
130
+ // to avoid "undefined" appearing in resource names
131
+ mappingKey: "",
129
132
  },
130
133
  defaultAuthorizer: defaultAuthorizer ?? new aws_apigatewayv2_authorizers_1.HttpIamAuthorizer(),
131
134
  });
@@ -214,6 +217,11 @@ const createHttpApiGatewaySQSEndpoint = (method, path, queue, api) => {
214
217
  methods: [getHttpMethod(method)],
215
218
  integration: new apigatewayv2_integrations.HttpSqsIntegration(`${method}-${sanitizedPath}`, {
216
219
  queue: queue,
220
+ // Configure parameter mapping to use the entire request body as the message body
221
+ // By default, it expects $request.body.MessageBody, but we want to send the whole body
222
+ parameterMapping: apigatewayv2.ParameterMapping.fromObject({
223
+ MessageBody: apigatewayv2.MappingValue.custom("$request.body"),
224
+ }),
217
225
  }),
218
226
  });
219
227
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certenza/aws-cdk-infrastructure-commons",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "description": "Common infrastructure reusable utilities and resources for Certenza projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",