All articles

· 23 min read · Cloud Architecture / API Modernization

Building a Serverless SOAP-to-JSON Integration Gateway on AWS

Architecture, DynamoDB Templates, CloudWatch Monitoring, and Cross-Account Alerting

Modernizing enterprise integrations does not always require replacing the systems involved.

Many organizations still depend on applications that exchange information using SOAP and XML. These integrations may support critical business operations, even as newer downstream services increasingly use JSON-based APIs and cloud-native infrastructure.

The challenge is creating a reliable integration boundary between systems that use different communication contracts.

One approach is to introduce a serverless gateway that accepts existing SOAP/XML requests, transforms the payloads into the JSON structures expected by downstream services, and manages communication between the two.

But successful API modernization involves more than message transformation.

The integration must also be secure, observable, deployable across multiple environments, and supportable by engineering teams when failures occur.

This article explores an AWS serverless architecture using Amazon API Gateway, AWS Lambda, Amazon DynamoDB, Mustache, AWS WAF, AWS CDK, Amazon CloudWatch, and Amazon EventBridge.

It also examines a centralized monitoring approach in which CloudWatch alarms from Development, Integration, Pre-production, and Production environments are forwarded to a dedicated monitoring account, allowing engineering teams to receive incident notifications through Microsoft Teams.

The architecture draws on relevant professional engineering experience delivered by a member of the Avasarant team during a previous engagement. The code and payload examples are illustrative reference implementations, not extracts from the original project.

1. The Enterprise Integration Problem

Consider an enterprise environment with established applications that continue to communicate through SOAP/XML interfaces.

Over time, the organization introduces newer services designed around HTTP APIs and JSON payloads.

The existing systems remain operational, but their interface contracts differ.

A SOAP-based consumer may submit an XML envelope containing a business transaction, while the downstream service expects an entirely different JSON structure.

The challenge is not merely translating syntax.

The integration must address several concerns:

  • Parsing incoming SOAP/XML messages correctly.
  • Extracting business-relevant information.
  • Mapping fields into downstream API contracts.
  • Supporting different transformation requirements.
  • Controlling access to the integration endpoint.
  • Handling downstream communication failures.
  • Monitoring request volumes, response times, and errors.
  • Deploying the same architecture across multiple environments.
  • Alerting engineers when integration failures occur.

Building transformation logic independently into every consumer or downstream application would increase coupling and maintenance effort.

A dedicated integration gateway can centralize these responsibilities while allowing existing application contracts to remain in use.

2. Architectural Overview: A Serverless Integration Gateway

The architecture separates incoming request handling, payload transformation, downstream communication, and operational monitoring into distinct responsibilities.

The core integration flow is:

SOAP requests pass through AWS WAF and API Gateway to Lambda, which reads a DynamoDB template and renders JSON with Mustache for the downstream API.

AWS CDK provides Infrastructure as Code for provisioning and maintaining the AWS resources.

Amazon CloudWatch collects operational telemetry, including API traffic, Lambda execution metrics, and application-level information.

A separate monitoring architecture processes alarm-state changes and routes relevant incidents to a centralized monitoring account.

This separation is important: the gateway is responsible for application integration, while the monitoring system is responsible for visibility and incident notification.

Why Serverless?

Serverless architecture was a suitable choice for the integration layer because AWS-managed services could handle API entry, event-driven execution, template storage, and infrastructure provisioning.

AWS Lambda eliminates the need to provision dedicated servers for the transformation application.

API Gateway provides a managed front door, while DynamoDB provides managed storage for transformation templates.

However, serverless does not automatically guarantee unlimited throughput or lower cost.

Actual scalability depends on Lambda concurrency, DynamoDB access patterns, downstream service capacity, network connections, and workload characteristics.

These constraints must be considered during design and performance testing.

3. Securing the API Entry Point Using AWS WAF

An enterprise integration gateway may be intended for a defined set of consuming systems rather than unrestricted public access.

In such environments, network-based source restrictions can provide an additional protective layer.

AWS WAF supports IP-based filtering through IP sets and Web ACL rules.

For an integration where approved consumers use known outbound public IP addresses, a Web ACL can permit traffic from those addresses and block traffic from other sources.

Conceptually:

AWS WAF blocks requests from unapproved source networks and lets approved requests proceed to API Gateway and Lambda.

AWS WAF can be associated directly with supported Amazon API Gateway REST API stages. Other API Gateway configurations require verifying the supported WAF integration or using an appropriate protected entry point.

Why Restrict by Source Network?

Network allowlisting can reduce the number of systems able to reach an integration endpoint.

This is useful for business-to-business integrations, controlled enterprise networks, and partner systems with stable egress IP addresses.

However, allowlisting is not equivalent to authentication.

A request from an approved network still needs appropriate validation, and sensitive operations may require service authentication and authorization.

A complete security design should consider transport encryption, least-privilege IAM permissions, secret management, request-size limits, and protection against malicious XML input.

The WAF configuration should also be treated as code and managed through the same controlled deployment process as the rest of the infrastructure.

4. Using AWS Lambda as the Transformation Engine

AWS Lambda acts as the processing layer between the incoming SOAP/XML request and the downstream JSON service.

At a conceptual level, the Lambda function performs six responsibilities:

  1. Receive the request from API Gateway.
  2. Validate and parse the SOAP/XML payload.
  3. Extract the business fields needed by the destination service.
  4. Retrieve the appropriate transformation template.
  5. Generate and validate the JSON payload.
  6. Invoke the downstream service and handle its response.

This design makes Lambda an integration adapter rather than a replacement for the underlying business application.

Parsing SOAP/XML Payloads

SOAP messages generally contain an XML envelope with a body holding the application request.

Consider this simplified example:

<soap:Envelope
  xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SubmitShipment>
      <ShipmentId>SHP-10245</ShipmentId>
      <CustomerId>CUST-9001</CustomerId>
      <Weight>12.5</Weight>
    </SubmitShipment>
  </soap:Body>
</soap:Envelope>

The integration must identify the SOAP body and extract the required business values.

The result might be represented internally as:

{
  "shipmentId": "SHP-10245",
  "customerId": "CUST-9001",
  "weight": 12.5
}

This intermediate representation separates XML parsing from downstream payload construction.

It also creates an opportunity to validate the extracted fields before transformation.

XML Parsing Considerations

Enterprise SOAP integration requires more than converting XML into a JavaScript object.

The parser must account for XML namespaces, repeated elements, optional fields, data types, and schema requirements.

Security is equally important.

XML parsers should be configured to prevent unsafe external entity resolution and other unwanted DTD or entity-expansion behavior.

Incoming payload size and structural complexity should be bounded.

SOAP faults should also be handled explicitly rather than treated as ordinary successful business responses.

The transformation should preserve the meaning of the original request, including numeric precision, identifiers, and date-time values.

5. Storing Transformation Templates in Amazon DynamoDB

One of the most interesting design decisions is storing transformation templates in DynamoDB instead of embedding every JSON mapping directly in the Lambda source code.

Consider an integration gateway that supports multiple downstream operations.

One operation may require shipment information, another customer details, and another a financial transaction.

Each downstream API may expect a different JSON contract.

If every transformation is hardcoded, adding or modifying an interface can require changing and redeploying the processing application.

A template-driven architecture separates reusable transformation logic from output payload definitions.

Conceptual DynamoDB Data Model

A transformation-template item could use a structure such as:

Attribute Purpose
templateKey Identifies the integration operation
version Identifies the transformation contract version
templateBody Stores the Mustache template
status Indicates whether the template is active
updatedAt Supports operational auditing

This is an illustrative model, not a claim about the original table schema.

A versioned key design is often preferable to silently overwriting templates used by production traffic.

It allows the integration to select a defined contract version and supports controlled rollbacks when mappings change.

The Lambda execution role should have access only to the DynamoDB resources and operations it needs.

Why DynamoDB?

DynamoDB provides managed, low-latency key-value access that can suit predictable template lookup patterns.

It avoids introducing a relational database solely for storing transformation definitions.

Its suitability depends on template size, access frequency, versioning requirements, and how templates are governed.

Frequently accessed templates can also be cached within reused Lambda execution environments, provided that cache expiration and invalidation behavior are carefully defined.

Caching should never create an uncontrolled situation where different Lambda instances use incompatible template versions.

6. Transforming XML Data Into JSON With Mustache

Mustache is a logic-less templating system that separates a template's structure from the data used to render it.

In this architecture, Mustache can be used to construct downstream-specific JSON payloads from the normalized request data.

Example Transformation

Suppose the downstream shipment service expects:

{
  "shipmentReference": "SHP-10245",
  "customer": {
    "reference": "CUST-9001"
  },
  "package": {
    "weightKg": 12.5
  }
}

A conceptual Mustache template might be:

{
  "shipmentReference": {{{shipmentIdJson}}},
  "customer": {
    "reference": {{{customerIdJson}}}
  },
  "package": {
    "weightKg": {{{weightJson}}}
  }
}

The Lambda function supplies JSON-serialized values to the template.

For example:

const view = {
  shipmentIdJson: JSON.stringify(request.shipmentId),
  customerIdJson: JSON.stringify(request.customerId),
  weightJson: JSON.stringify(request.weight),
};

const rendered = Mustache.render(template, view);

const downstreamPayload = JSON.parse(rendered);

This is deliberately simplified; the input must already have passed the relevant parsing and schema validation.

A Critical JSON-Escaping Detail

Mustache normally applies HTML escaping to ordinary variable substitutions.

HTML escaping is not the same as JSON escaping.

For JSON payload construction, the example uses JSON.stringify to serialize validated values and triple Mustache tags to insert those serialized values without additional HTML escaping.

Triple tags must never be used to insert arbitrary unvalidated request fragments.

The final rendered document should always be parsed and validated against the downstream schema before being transmitted.

This prevents a transformation layer from assuming that successfully rendered text is automatically valid JSON.

Why Separate Templates From Processing Logic?

The principal architectural advantage is separation of concerns.

The Lambda application remains responsible for request handling, validation, transformation orchestration, and downstream communication.

The template defines the output structure.

This can support a reusable transformation engine across multiple operations.

However, template-based integration introduces its own engineering responsibilities.

Templates should be tested, versioned, reviewed, and deployed through controlled processes.

Changes to production transformation contracts should be treated with the same seriousness as changes to application code.

7. Calling Downstream JSON Services

After transforming the request, Lambda invokes the appropriate downstream service.

A typical HTTP integration includes:

  • A defined downstream endpoint.
  • Service authentication where required.
  • A validated JSON request body.
  • Request and connection timeouts.
  • Response-status evaluation.
  • Structured error classification.
  • Correlation identifiers.

The downstream response then needs to be handled according to the contract expected by the original consumer.

For some integrations, this may involve transforming JSON back into a SOAP-compatible response. For others, the response-handling requirements may differ.

The implementation discussed here establishes the confirmed inbound SOAP/XML-to-JSON request transformation; it does not assume that bidirectional response transformation was implemented.

Handling Failures

Several failure categories should be distinguished.

Validation failure: The incoming request does not satisfy the expected contract.

Template failure: The template cannot be retrieved, rendered, or validated.

Downstream failure: The destination service rejects the request or returns an error.

Timeout: The integration cannot determine the result within the configured time limit.

Infrastructure failure: An AWS service dependency or required resource is unavailable.

Classifying these failures helps engineers identify the problem and supports more meaningful monitoring.

Retries require particular care.

If the downstream service processes a transaction but the response is lost, blindly repeating the request can cause duplicate business operations.

Idempotency keys or equivalent duplicate-protection mechanisms should be considered for state-changing operations.

The integration must respect downstream rate and concurrency limits rather than assuming Lambda can safely scale without restriction.

8. Observability: Monitoring More Than Lambda Errors

A transformation gateway might appear healthy at the infrastructure level while business transactions fail.

For example, Lambda can execute successfully from the platform's perspective but receive an error response from a downstream service.

Similarly, a transformation failure may be caught and returned as an application error without incrementing the Lambda Errors metric.

This distinction matters when designing CloudWatch dashboards and alarms.

A useful monitoring strategy combines AWS service metrics with application-level telemetry.

Infrastructure Metrics

Amazon API Gateway provides metrics such as request count, client errors, server errors, latency, and integration latency.

AWS Lambda provides invocation count, execution duration, error count, throttling, and concurrency-related metrics.

AWS WAF provides request and rule-action metrics.

DynamoDB provides operational metrics covering requests, throttling, and other database activity.

Application-Level Metrics

The integration application may need additional custom metrics, such as:

  • Successful transformations.
  • XML parsing failures.
  • Transformation-template failures.
  • Downstream request failures.
  • Downstream response latency.
  • End-to-end processing success rates.

Custom metrics should reflect meaningful operational outcomes rather than simply duplicating every infrastructure metric.

CloudWatch Embedded Metric Format or an appropriate telemetry library can help publish application metrics from Lambda.

High-cardinality values, including unique request IDs and customer identifiers, should not be used indiscriminately as CloudWatch metric dimensions because they can create excessive metric series and cost.

Such identifiers are generally more appropriate in structured logs or tracing context.

Structured Application Logging

Logs should provide enough context for engineers to diagnose an integration failure without exposing sensitive payloads.

For example:

{
  "environment": "prod",
  "integration": "shipment-submission",
  "requestId": "example-correlation-id",
  "stage": "transformation",
  "status": "failed",
  "errorCode": "TEMPLATE_RENDER_ERROR",
  "durationMs": 42
}

This is an illustrative logging structure.

It provides useful diagnostic context without storing the original SOAP message or customer information.

Teams can correlate these records with API Gateway access logs and downstream telemetry.

9. CloudWatch Dashboards for Engineering Teams and Managers

Dashboards should answer different questions for different audiences.

A manager typically needs to know whether an integration is operating normally, how much traffic it processes, and whether failures are increasing.

A developer needs deeper details about which part of the request flow is failing.

CloudWatch dashboards can support both views.

Management Dashboard

A management-oriented integration dashboard could display:

Metric Business question
Total requests How much integration traffic are we processing?
Successful requests How many requests completed successfully?
Failed requests How many requests failed?
Success rate What proportion of requests succeeded?
Request latency How long are requests taking?
Environment health Which environments have active problems?

The dashboard should clearly define what constitutes a successful request.

For example, an HTTP 200 response is not necessarily proof that a downstream business operation completed successfully.

The metrics should represent the agreed business or integration outcome.

Dashboards should also distinguish traffic volume from reliability.

A system processing a small number of requests with a high failure percentage may deserve more attention than one processing considerably more traffic with occasional expected validation errors.

Engineering Dashboard

The engineering view can provide greater detail:

  • API Gateway 4XX and 5XX error rates.
  • Lambda invocation errors and throttling.
  • Duration percentiles.
  • Transformation failures.
  • DynamoDB access errors or throttling.
  • Downstream latency and failure counts.
  • CloudWatch alarm status.
  • Links to relevant logs and operational documentation.

A useful dashboard does not simply collect every available metric.

It prioritizes signals that help teams understand the health of the integration and identify the likely source of failure.

10. Centralized Monitoring Across Four AWS Environments

Enterprise delivery pipelines commonly separate workloads into multiple environments.

In the architecture discussed here, the relevant environments were:

  • Development (DEV): Ongoing development and functional changes.
  • Integration (INT): Testing interaction between components and dependent systems.
  • Pre-production (PRE-PROD): Validating release readiness in a production-like environment.
  • Production (PROD): Serving live business integrations.

Each environment can generate operational signals independently.

Without a centralized monitoring approach, engineers may need to inspect several AWS accounts or dashboards to identify failures.

A dedicated monitoring account can provide a common operational entry point.

Centralized Alarm Event Flow

The monitoring architecture can be represented as:

CloudWatch alarms in four workload accounts are forwarded by EventBridge rules to a central event bus. Receiving rules route notifications through SNS to Microsoft Teams via Amazon Q Developer in chat applications.

Each environment generates its own CloudWatch alarms.

When an alarm changes state, CloudWatch emits an event to Amazon EventBridge.

A rule in the originating account can forward matching events to an EventBridge bus in the central monitoring account.

The receiving account then applies its own rules to process or route the events.

This allows alert handling to be organized centrally while the workloads remain separated by environment.

Why Use a Separate Monitoring Account?

A dedicated monitoring account can provide a central place for operational visibility and notification configuration.

It also reduces the need to maintain independent notification integrations in every workload account.

However, centralization requires careful access management.

The monitoring account should be permitted to receive only the necessary events and should not automatically receive broad administrative permissions over every source account.

Cross-account EventBridge delivery requires an authorized sender role and appropriate permissions on the destination event bus.

Account identifiers and AWS Regions should also be considered when designing receiving rules.

11. How CloudWatch Alarms Reach Amazon EventBridge

CloudWatch alarms evaluate metric conditions and transition between states such as OK, ALARM, and INSUFFICIENT_DATA.

When an alarm changes state, CloudWatch emits an EventBridge event.

A simplified rule pattern for identifying alarms entering the ALARM state is:

{
  "source": ["aws.cloudwatch"],
  "detail-type": ["CloudWatch Alarm State Change"],
  "detail": {
    "state": {
      "value": ["ALARM"]
    }
  }
}

This pattern matches alarm-state events, not every individual request failure.

That distinction prevents a monitoring system from confusing application error events with alarm transitions.

Example Incident Flow

Suppose the Production integration gateway experiences a sustained increase in downstream errors.

The sequence may be:

  1. Lambda records downstream failures through the application's telemetry.
  2. CloudWatch evaluates the relevant failure metric.
  3. The metric breaches a configured alarm threshold.
  4. CloudWatch changes the alarm state to ALARM.
  5. EventBridge receives the alarm-state-change event.
  6. The Production account forwards the event to the monitoring account.
  7. The monitoring account matches and processes the event.
  8. A notification reaches the engineering team's Microsoft Teams channel.
  9. Developers investigate the linked metrics and logs.

The notification should help engineers identify the affected environment, integration, alarm, and reason for the state change.

A useful incident message might look like this:

Production API Integration Alert

Environment: PROD
Service: SOAP-to-JSON Integration Gateway
Alarm: Downstream Failure Rate
State: ALARM
Detected at: 14:32 UTC
Action: Review CloudWatch metrics and correlated application logs.

This is an illustrative message format rather than an actual incident record.

Preventing Alert Noise

Different environments should not necessarily use identical notification thresholds or escalation policies.

Development and integration environments often produce expected errors during testing.

Production failures may require higher-priority attention.

A practical policy can differentiate notification routing and severity by environment, service criticality, and alarm category.

It should also address recovery notifications, repeated incidents, and alarms remaining in an unknown state.

Centralized alerting becomes less useful when every expected development error generates the same level of notification as a production outage.

12. Delivering AWS Alerts to Microsoft Teams

Microsoft Teams provides a shared communication channel where engineering teams can become aware of incidents without constantly checking AWS consoles.

AWS supports integration with Microsoft Teams through Amazon Q Developer in chat applications, previously known as AWS Chatbot.

A supported notification architecture is:

The central EventBridge bus receives alarm events. An EventBridge rule sends selected events to Amazon SNS, and Amazon Q Developer in chat applications delivers notifications to the Microsoft Teams channel.

The central EventBridge rule selects relevant incidents and publishes notifications to an SNS topic.

Amazon Q Developer in chat applications can deliver supported notifications from that SNS topic into a configured Microsoft Teams channel.

This is one AWS-supported implementation for the final notification hop. The exact delivery mechanism used in the earlier professional engagement would need to be confirmed separately.

A Lambda notification formatter is another possible option when the organization requires custom incident formatting or additional business logic.

What Should an Alert Contain?

An effective notification should include:

  • Environment and affected service.
  • Alarm name and severity.
  • Current alarm state.
  • Reason for the state change.
  • Timestamp.
  • A relevant dashboard or log-investigation link.

Sensitive SOAP payloads, credentials, customer records, and private downstream response bodies should not be sent to chat notifications.

The notification should provide enough information to begin troubleshooting, not attempt to reproduce all diagnostic logs inside Teams.

Monitoring the Monitoring Pipeline

The alerting architecture itself can fail.

EventBridge target delivery can encounter permission errors, unavailable targets, or retries.

Relevant delivery failures should be observable.

Dead-letter queues, delivery failure metrics, and periodic notification tests can help detect failures in the alert-routing path.

Where business impact justifies it, critical production incidents should also have an escalation path independent of a single Teams channel.

13. Centralized Dashboards Versus Centralized Alarm Events

There is an important difference between forwarding alarms and viewing metrics across AWS accounts.

EventBridge forwards events. It does not automatically centralize the underlying CloudWatch metrics and logs.

An EventBridge alarm-state-change event can tell the monitoring account that a particular alarm has entered the ALARM state.

It does not, by itself, make all request-count metrics, latency distributions, or Lambda logs available in the monitoring account.

For centralized telemetry access, AWS provides CloudWatch cross-account observability using Observability Access Manager (OAM).

With the appropriate source-account links, teams can create dashboards in a monitoring account that reference metrics from other accounts.

This establishes two complementary capabilities:

Operational visibility

Source-account metrics and logs are accessed through an appropriately configured cross-account observability mechanism.

Incident notification

CloudWatch alarm-state events are forwarded through EventBridge and routed to the notification system.

The two paths solve different problems and should be documented separately.

For managers, this separation means dashboards can show integration volumes and trends, while Teams notifications highlight incidents that require attention.

For engineers, the notifications provide the initial signal and the dashboards and logs provide the information needed for investigation.

14. Deploying the Architecture Using AWS CDK

Infrastructure as Code helps ensure that applications and their supporting resources are provisioned consistently.

AWS Cloud Development Kit allows infrastructure to be defined using programming languages such as TypeScript and synthesized into AWS CloudFormation templates.

For a multi-environment integration platform, CDK can manage resources such as:

  • API Gateway APIs and stages.
  • Lambda functions and IAM roles.
  • DynamoDB tables.
  • AWS WAF Web ACLs and associations.
  • CloudWatch log groups and alarms.
  • EventBridge rules and event buses.
  • SNS notification resources.

A conceptual project organization might separate the application and monitoring infrastructure:

infrastructure/
  bin/
    app.ts

  lib/
    integration-gateway-stack.ts
    integration-monitoring-stack.ts
    central-monitoring-stack.ts

  config/
    dev.ts
    int.ts
    preprod.ts
    prod.ts

This is an illustrative structure, not the original project's repository layout.

The integration-gateway stack would provision the request-processing infrastructure.

Environment-specific monitoring stacks would define relevant metrics, alarms, and event-forwarding rules.

A central monitoring stack would configure the receiving event bus and notification resources.

Illustrative AWS CDK EventBridge Rule

The following TypeScript example shows how CDK v2 can describe a source-account rule that forwards CloudWatch alarm events to a monitoring account's event bus.

import * as events from "aws-cdk-lib/aws-events";
import * as targets from "aws-cdk-lib/aws-events-targets";

const monitoringBus = events.EventBus.fromEventBusArn(
  this,
  "MonitoringBus",
  monitoringBusArn
);

const alarmRule = new events.Rule(
  this,
  "ForwardAlarmEvents",
  {
    eventPattern: {
      source: ["aws.cloudwatch"],
      detailType: ["CloudWatch Alarm State Change"],
      detail: {
        state: {
          value: ["ALARM"]
        }
      }
    }
  }
);

alarmRule.addTarget(
  new targets.EventBus(monitoringBus)
);

This snippet illustrates event matching and forwarding only.

A complete deployment also requires a destination event-bus resource policy, appropriate cross-account IAM permissions, delivery-failure handling, and the receiving rules in the monitoring account.

The central account must explicitly authorize the approved source accounts.

This configuration should be tested in each target environment before production rollout.

Why CDK Matters Beyond Deployment

Infrastructure as Code helps teams manage configuration differences across environments.

It also supports reviewable changes, repeatable deployments, and automated checks.

For this type of architecture, important automated checks could verify that:

  • WAF restrictions remain configured.
  • Lambda roles do not acquire unnecessary permissions.
  • CloudWatch alarms exist for critical failures.
  • EventBridge forwarding rules target the correct monitoring account.
  • The monitoring account accepts events only from authorized sources.
  • Production deployments use the intended resources and configuration.

CDK does not eliminate deployment risk, but it makes infrastructure changes easier to examine and reproduce.

15. Testing the Complete Integration Architecture

Testing an integration gateway requires more than confirming that a sample SOAP message produces JSON.

A comprehensive test strategy should cover transformation behavior, downstream communication, security restrictions, and monitoring.

Transformation Tests

Verify that valid SOAP requests produce the expected JSON representation.

Include missing fields, namespaces, special characters, repeated elements, numeric precision, and malformed XML.

Test each supported template version against the expected downstream schema.

Downstream Integration Tests

Verify successful communication and failure behavior.

Test service timeouts, validation failures, temporary unavailability, and unexpected responses.

State-changing operations should be evaluated for duplicate-request safety.

Security Tests

Verify that unauthorized source networks are blocked according to the configured WAF policy.

Test authentication and authorization controls separately.

Confirm that logs do not expose sensitive request data.

Performance Tests

Measure end-to-end latency and throughput rather than Lambda execution time alone.

Evaluate downstream capacity, concurrency, template retrieval latency, and failure behavior under load.

Performance claims should always be supported by documented test conditions.

Monitoring and Alerting Tests

Testing should also cover the operational path.

For example:

  1. Generate a controlled application failure in a non-production environment.
  2. Confirm that the expected telemetry is recorded.
  3. Verify that the relevant CloudWatch alarm changes state.
  4. Confirm that EventBridge forwards the event to the monitoring account.
  5. Verify that the receiving rule processes the event.
  6. Confirm that the incident notification reaches the intended Teams channel.
  7. Confirm that the associated dashboard and logs support investigation.

This end-to-end exercise validates not just the application but the team's ability to recognize and investigate an incident.

16. Architectural Trade-Offs and Lessons

The architecture offers several useful engineering lessons.

Template-Driven Transformation Improves Reuse but Needs Governance

Storing templates in DynamoDB can reduce hardcoded transformation logic.

However, the architecture requires template validation, version control, controlled updates, and clear ownership.

A configuration-driven system without governance can become as difficult to maintain as hardcoded integrations.

Serverless Reduces Server Management, Not Engineering Responsibility

AWS manages much of the underlying infrastructure, but teams must still design concurrency controls, secure service communication, logging, monitoring, and failure recovery.

Downstream services may also place strict limits on throughput.

Centralized Alerting Improves Visibility but Can Introduce Dependencies

Forwarding alarms from DEV, INT, PRE-PROD, and PROD to a monitoring account gives teams a consistent notification path.

However, the central monitoring pipeline must be protected, tested, and monitored.

A shared event bus should not become an uncontrolled destination for unrelated events.

Dashboards Must Reflect Business Outcomes

An integration can report successful infrastructure execution while downstream business processing fails.

Managers and engineers need operational indicators that distinguish request receipt, successful transformation, successful downstream invocation, and completed business processing.

Without those distinctions, dashboards can provide a misleading picture of service health.

Modernization Is About Integration Contracts

The most significant architectural benefit is preserving compatibility between established and modern applications.

The gateway enables communication across different interface formats without requiring the participating systems to be rewritten simultaneously.

This is the central value of integration-layer API modernization.

Conclusion: API Modernization Requires Both Integration and Operational Visibility

A successful API modernization initiative should not stop when a SOAP message has been converted into JSON.

The integration also needs appropriate security controls, reliable downstream communication, controlled deployments, meaningful monitoring, and incident notification.

The AWS serverless architecture discussed in this article demonstrates how several services can work together to address these requirements.

API Gateway and AWS Lambda provide the integration processing layer.

DynamoDB and Mustache support template-driven payload transformation.

AWS WAF adds network-level request restrictions.

AWS CDK provides Infrastructure as Code.

CloudWatch supplies operational telemetry and dashboards, while EventBridge enables alarm events from separate environments to be routed toward a centralized monitoring account.

Microsoft Teams notifications help engineering teams become aware of incidents and begin investigating them.

Together, these architectural patterns demonstrate an important principle:

Modernizing an API is not just about changing a protocol. It is about creating an integration that can be secured, operated, monitored, and maintained reliably.

For organizations relying on legacy SOAP services, ERP integrations, or older enterprise applications, introducing a carefully designed integration boundary can be a practical alternative to replacing systems that still perform essential business functions.

At Avasarant Business Systems Pvt. Ltd., we focus on practical legacy application integration, API modernization, cloud architecture, and business process modernization.

Explore our Legacy API and Application Modernization services to learn how existing systems can be integrated with newer applications without unnecessary disruption.

For additional engineering context, see our relevant team experience in modernizing SOAP integrations.

Experience disclosure: The serverless integration and monitoring concepts discussed here are informed by professional experience from a previous engagement undertaken by a member of the Avasarant team. Illustrative code, data models, and recommended operational controls do not necessarily represent the exact implementation used in that engagement.

AWS service icons from AWS Icons for PlantUML, distributed under CC BY-ND 2.0.

If you are dealing with one of these problems now, write to us.

Tell us how the operation runs today. We will respond with a clear next step — not a generic deck.