TalksAWS re:Invent 2025 - The Shapeshifting Application: Architecture That Transforms Across AWS (CNS426)

AWS re:Invent 2025 - The Shapeshifting Application: Architecture That Transforms Across AWS (CNS426)

Transforming Applications Across AWS Compute Services

Monolithic Architecture Challenges

  • Tight coupling between business logic and infrastructure
  • Assumptions about the underlying database and AWS SDK usage
  • Difficulty scaling and migrating to different environments

Microservices Architecture Limitations

  • Still have some coupling between components
  • Challenges in deploying across different compute platforms

Clean Architecture Approach

  • Separates business logic (domain) from infrastructure concerns
  • Uses ports and adapters to decouple application from specific technologies
  • Allows flexibility in deploying the same codebase across different compute environments

Domain Layer

  • Contains the core business logic, independent of any infrastructure
  • Defines the entities and validation rules without any external dependencies

Ports Layer

  • Defines the contracts (interfaces) for interacting with the application
  • Provides a way to abstract the implementation details

Adapters Layer

  • Implements the port interfaces based on the target environment
  • Handles environment-specific details like fetching configuration from SSM or environment variables

Deployment Flexibility

  • The same application codebase can be deployed to Lambda, ECS, or EKS
  • The application uses a factory to create the appropriate configuration adapter based on the runtime environment
  • Deployment scripts handle the infrastructure provisioning for each compute platform

Key Takeaways

  1. Separate business logic from infrastructure concerns using clean architecture principles.
  2. Introduce ports and adapters to decouple the application from specific technologies and environments.
  3. Use a factory pattern to dynamically load the appropriate configuration adapter based on the runtime environment.
  4. Leverage deployment scripts to provision the required infrastructure for each compute platform (Lambda, ECS, EKS).
  5. Achieve portability and flexibility in deploying the same application codebase across different AWS compute services.

Technical Details

  • Programming language: Python
  • Web framework: FastAPI
  • Compute services: AWS Lambda, Amazon ECS, Amazon EKS
  • Configuration management: AWS Systems Manager (SSM)
  • Deployment automation: Shell scripts

Business Impact

  • Enables organizations to choose the most appropriate compute platform for each workload based on their requirements, without rewriting the entire application.
  • Improves developer productivity by providing a consistent codebase that can be easily deployed to different environments.
  • Increases operational efficiency by simplifying the management and scaling of applications across various AWS compute services.
  • Enhances the overall agility and responsiveness of the application architecture to changing business needs.

Example Use Case

  • An e-commerce application with various components (frontend, orders, catalog, checkout) that need to be deployed across different compute platforms based on their specific requirements.
  • The clean architecture approach allows the team to maintain a single codebase that can be easily deployed to Lambda, ECS, or EKS as needed, without significant refactoring.
  • The configuration adapters handle the environment-specific details, making it seamless to migrate the application between compute platforms as the business needs evolve.

Your Digital Journey deserves a great story.

Build one with us.

Cookies Icon

These cookies are used to collect information about how you interact with this website and allow us to remember you. We use this information to improve and customize your browsing experience, as well as for analytics.

If you decline, your information won’t be tracked when you visit this website. A single cookie will be used in your browser to remember your preference.