Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Refactoring | Monitoring, Security, and Optimization
AWS Certified Developer - Associate

bookRefactoring

Introduction

In this final chapter, you'll learn how to optimize your application architecture using AWS - native services. Refactoring is more than rewriting code — it's about rethinking your architecture for performance, scalability, and cost efficiency.

We'll look at how to modernize a traditional app by using tools like Lambda, API Gateway, CloudWatch, and Secrets Manager to build scalable and secure cloud-native systems.

Why Refactor for AWS?

Refactoring your application for AWS-native architecture means:

  • Reducing infrastructure overhead by moving to managed services;
  • Gaining scalability and resilience through cloud-native patterns;
  • Lowering costs by eliminating underutilized resources;
  • Improving security and performance using built-in AWS features.

Rather than simply migrating, refactoring helps you reimagine how your app runs in the cloud.

A Migration Example

Let's take a typical scenario: a Node.js Express app running on EC2.

To refactor this:

  1. Move API routes to Lambda, and expose them via API Gateway;
  2. Use Secrets Manager or Parameter Store to manage environment secrets;
  3. Automate deployments using CodePipeline;
  4. Enable logging and tracing with CloudWatch and X-Ray.

This approach reduces operational complexity, improves visibility, and makes the system more maintainable.

Refactoring Strategies

There's no single refactoring path that works for all applications. Common strategies include:

  • Triangular pattern: phase out monoliths over time by breaking off components;
  • Lift and reshape: migrate and improve the architecture simultaneously.

By embracing event-driven design, decoupled architecture, and AWS security best practices, you build systems that naturally scale and recover.

Bringing It All Together

Everything we've covered—CI/CD, security, monitoring, event-driven design—comes together in a refactored, cloud-native application.

You now have the tools to:

  • Modernize legacy applications;
  • Simplify infrastructure;
  • Automate workflows;
  • Secure and monitor your systems effectively.

Key Takeaways

Refactoring is not about rehosting — it's about reimagining your application for the cloud.

  • Use Lambda and API Gateway to decouple logic;
  • Use Parameter Store or Secrets Manager to manage secrets;
  • Use CloudWatch and X-Ray to monitor and troubleshoot;
  • Automate deployments with CodePipeline.

The goal is to reduce manual operations, increase deployment speed, and safely deliver features using AWS best practices.

What to Expect on the Exam

Expect scenario-based questions that test:

  • When to use Secrets Manager vs. Parameter Store;
  • How to apply X-Ray for tracing;
  • Which services protect APIs;
  • How to refactor using Lambda, IAM, and CodePipeline.

You'll need to show understanding of decoupling, automation, security, and monitoring in real-world AWS development scenarios.

Final Note

If you've reached this point, congratulations — you're almost ready to take the AWS Certified Developer exam.

In the next section, we'll go over exam tips and strategies to help you perform your best.

1. What is the primary goal of refactoring an application for AWS?

2. In the example scenario, what service replaces the Express app's API routes?

3. Which service exposes Lambda functions to the web as APIs?

4. Why should you store secrets in AWS Secrets Manager or Parameter Store instead of

environment files?

5. What AWS tool is best suited to automate deployment workflows?

6. What AWS service provides request tracing and helps identify performance

bottlenecks in a distributed system?

7. Which refactoring strategy involves gradually phasing out a monolith?

8. Which combination best supports secure, observable, and scalable serverless apps on

AWS?

9. What should you expect on the exam regarding refactoring topics?

question mark

What is the primary goal of refactoring an application for AWS?

Select the correct answer

question mark

In the example scenario, what service replaces the Express app's API routes?

Select the correct answer

question mark

Which service exposes Lambda functions to the web as APIs?

Select the correct answer

question mark

Why should you store secrets in AWS Secrets Manager or Parameter Store instead of environment files?

Select the correct answer

question mark

What AWS tool is best suited to automate deployment workflows?

Select the correct answer

question mark

What AWS service provides request tracing and helps identify performance bottlenecks in a distributed system?

Select the correct answer

question mark

Which refactoring strategy involves gradually phasing out a monolith?

Select the correct answer

question mark

Which combination best supports secure, observable, and scalable serverless apps on AWS?

Select the correct answer

question mark

What should you expect on the exam regarding refactoring topics?

Select the correct answer

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 6. Kapitel 3

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

Awesome!

Completion rate improved to 6.25

bookRefactoring

Swipe um das Menü anzuzeigen

Introduction

In this final chapter, you'll learn how to optimize your application architecture using AWS - native services. Refactoring is more than rewriting code — it's about rethinking your architecture for performance, scalability, and cost efficiency.

We'll look at how to modernize a traditional app by using tools like Lambda, API Gateway, CloudWatch, and Secrets Manager to build scalable and secure cloud-native systems.

Why Refactor for AWS?

Refactoring your application for AWS-native architecture means:

  • Reducing infrastructure overhead by moving to managed services;
  • Gaining scalability and resilience through cloud-native patterns;
  • Lowering costs by eliminating underutilized resources;
  • Improving security and performance using built-in AWS features.

Rather than simply migrating, refactoring helps you reimagine how your app runs in the cloud.

A Migration Example

Let's take a typical scenario: a Node.js Express app running on EC2.

To refactor this:

  1. Move API routes to Lambda, and expose them via API Gateway;
  2. Use Secrets Manager or Parameter Store to manage environment secrets;
  3. Automate deployments using CodePipeline;
  4. Enable logging and tracing with CloudWatch and X-Ray.

This approach reduces operational complexity, improves visibility, and makes the system more maintainable.

Refactoring Strategies

There's no single refactoring path that works for all applications. Common strategies include:

  • Triangular pattern: phase out monoliths over time by breaking off components;
  • Lift and reshape: migrate and improve the architecture simultaneously.

By embracing event-driven design, decoupled architecture, and AWS security best practices, you build systems that naturally scale and recover.

Bringing It All Together

Everything we've covered—CI/CD, security, monitoring, event-driven design—comes together in a refactored, cloud-native application.

You now have the tools to:

  • Modernize legacy applications;
  • Simplify infrastructure;
  • Automate workflows;
  • Secure and monitor your systems effectively.

Key Takeaways

Refactoring is not about rehosting — it's about reimagining your application for the cloud.

  • Use Lambda and API Gateway to decouple logic;
  • Use Parameter Store or Secrets Manager to manage secrets;
  • Use CloudWatch and X-Ray to monitor and troubleshoot;
  • Automate deployments with CodePipeline.

The goal is to reduce manual operations, increase deployment speed, and safely deliver features using AWS best practices.

What to Expect on the Exam

Expect scenario-based questions that test:

  • When to use Secrets Manager vs. Parameter Store;
  • How to apply X-Ray for tracing;
  • Which services protect APIs;
  • How to refactor using Lambda, IAM, and CodePipeline.

You'll need to show understanding of decoupling, automation, security, and monitoring in real-world AWS development scenarios.

Final Note

If you've reached this point, congratulations — you're almost ready to take the AWS Certified Developer exam.

In the next section, we'll go over exam tips and strategies to help you perform your best.

1. What is the primary goal of refactoring an application for AWS?

2. In the example scenario, what service replaces the Express app's API routes?

3. Which service exposes Lambda functions to the web as APIs?

4. Why should you store secrets in AWS Secrets Manager or Parameter Store instead of

environment files?

5. What AWS tool is best suited to automate deployment workflows?

6. What AWS service provides request tracing and helps identify performance

bottlenecks in a distributed system?

7. Which refactoring strategy involves gradually phasing out a monolith?

8. Which combination best supports secure, observable, and scalable serverless apps on

AWS?

9. What should you expect on the exam regarding refactoring topics?

question mark

What is the primary goal of refactoring an application for AWS?

Select the correct answer

question mark

In the example scenario, what service replaces the Express app's API routes?

Select the correct answer

question mark

Which service exposes Lambda functions to the web as APIs?

Select the correct answer

question mark

Why should you store secrets in AWS Secrets Manager or Parameter Store instead of environment files?

Select the correct answer

question mark

What AWS tool is best suited to automate deployment workflows?

Select the correct answer

question mark

What AWS service provides request tracing and helps identify performance bottlenecks in a distributed system?

Select the correct answer

question mark

Which refactoring strategy involves gradually phasing out a monolith?

Select the correct answer

question mark

Which combination best supports secure, observable, and scalable serverless apps on AWS?

Select the correct answer

question mark

What should you expect on the exam regarding refactoring topics?

Select the correct answer

War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 6. Kapitel 3
some-alt