# Anti-Corruption Layer

> Implement a façade or adapter layer between a modern application and a legacy system

- **Category**: Cloud
- **Subcategory**: aws
- **Canonical URL**: https://designpattern.fyi/patterns/aws_anti_corruption_layer/

---

## Description
The Anti-Corruption Layer pattern implements a façade or adapter layer between a modern application and a legacy system. This layer isolates the modern application from the legacy system by translating data formats, protocols, and interfaces. It prevents the legacy system domain model from polluting the modern application domain model, enabling gradual migration without coupling the new system to legacy constraints.


## Use Cases
Use when integrating modern applications with legacy systems or when migrating from a monolith to microservices gradually.





## Trade-offs


### Advantages

- Isolates modern applications from legacy system complexities

- Enables gradual migration without full rewrite

- Translates between different data formats and protocols

- Prevents legacy domain model pollution




### Considerations & Drawbacks

- Additional layer adds complexity

- Requires maintenance of translation logic

- Can introduce performance overhead







---
**Reference**: [Original Source](https://docs.aws.amazon.com/prescriptive-guidance/latest/cloud-design-patterns/acl.html)

