In this video, you'll get started with environments in AWS Migration Hub Refactor Spaces.
With Refactor Spaces, you can create a refactor environment to incrementally
refactor apps and provision resources.
To begin, let’s navigate to AWS Migration Hub and open Refactor Spaces.
Refactor Spaces is the starting point for incremental application refactoring
to microservices in AWS.
The first step in using Refactor Spaces is to create an environment.
A Refactor Spaces environment provides a unified view of networking,
applications, and services across multiple AWS accounts.
Let’s give this environment a name.
We can create an application while creating the environment.
For demonstration purposes, we’ll create the application separately.
Now let’s create the environment.
As the environment is provisioned,
a transit gateway is also provisioned in the environment owner AWS account.
Let’s take a look at the transit gateway.
The transit gateway is used to interconnect the VPCs within the
refactor environment, including VPCs across AWS accounts.
We can see the Refactor Spaces environment ID in the description of the transit gateway.
Now let’s return to Refactor Spaces and create an application in our environment.
The application will contain services and routes, and provide a single external endpoint.
It will also provide a Strangler Fig proxy for incremental application refactoring.
Let’s name our application “WebStore.”
Next, we’ll select the application’s proxy VPC.
The proxy lets the front-end application use a single endpoint to contact multiple
services across AWS accounts.
Now let’s create the application.
As the application is provisioned, an Amazon API Gateway API, VPC link,
and Network Load Balancer are also provisioned.
Let’s navigate to Amazon API Gateway to look at the API that was created.
Here we can see the API, which has the application ID in the description.
The API acts as the "front door" for the application to access data,
business logic, or functionality from our backend services.
Next, let’s take a look at the VPC link that was created.
This link will allow the API Gateway to route traffic to private HTTP endpoints
using the Network Load Balancer.
Next, let’s take a look at the load balancer.
The load balancer has been tagged with the application ID.
Next, let’s navigate to Amazon Elastic Compute Cloud (Amazon EC2) to look
at the security group that has been created in our account.
As a Refactor Spaces environment can consist of multiple AWS accounts,
a security group is created in each AWS account in the environment.
The inbound rules of this security group allow traffic from the VPC CIDR blocks
in our refactor environment.
Note that the use of this security group is optional and is not associated
with any AWS resources by default.
The rules can also be modified if we want to restrict traffic.
The security group has been tagged with the Refactor Spaces environment ID.
Now let’s return to AWS Migration Hub Refactor Spaces to create a new service.
Since this is our first service, we’ll create a monolith service and route all traffic to it.
Now that our service and route have been created, let’s return to our API.
Here we can see that the resources and methods were created on our
application's API Gateway API in order to route our selected traffic
to the appropriate service endpoint.
Since our HTTP input was a private IP address, the VPC link created by
Refactor Spaces is being used for the private integration request.
You’ve just seen how to get started with environments in AWS Migration Hub Refactor Spaces.
You can learn more about this topic in the description and links for this video.
Thanks for watching. Now it’s your turn to try.