Creating an App Runner service through Amazon ECR
The following topic describes how to create and launch an AWS App Runner service from the Amazon Elastic Container Registry (Amazon ECR) node, in the AWS Toolkit for Visual Studio Code. For detailed information about the AWS App Runner and Amazon ECR services, see the AWS App Runner and Amazon ECR User Guides.
Prerequisites
Before you can create and launch an AWS App Runner from Amazon ECR in the AWS Toolkit, you must complete the following. For a detailed guide on how to complete these procedures, see the Working with Amazon Elastic Container Registry topic in this User Guide.
Create a
dockerfile
.Build an image from your
dockerfile
.Create a new repository.
Tag and push an image to your repository.
Creating an AWS App Runner service from an existing Amazon ECR repository
The following procedure describes how to create an AWS App Runner service from an existing Amazon ECR repository, in the AWS Toolkit.
From the AWS Explorer, expand the region that contains the Amazon ECR repository you want to create an AWS App Runner service from.
Expand the Amazon ECR service node to view your Amazon ECR repositories.
Open the context menu for (right-click) the Amazon ECR repository or repository image you want to create an AWS App Runner service from.
From the context menu, choose Create App Runner Service to open the AWS App Runner creation wizard in VS Code
From Enter a port for the new service (1/5), enter the port number you want to use, then press
Enter
to continue.From Configure environment variables (2/5), choose Use file... to browse to select browse your local files or choose Skip to skip this step.
From Select a role to pull from ECR (3/5), choose an existing IAM role from the list.
Note
The AppRunnerECRAccessRole access role is required to create an AWS App Runner service from an Amazon ECR private registry. If a valid role isn't available from the list, choose the + (Create Role...) icon to automatically create and assign AppRunnerECRAccessRole to your registry.
From Name your service (4/5), enter a name for your new service, then press
Enter
to continue.From Select instance configuration (5/5) choose the
vCPU
andMemory
configuration from the list to create your new service.From the AWS Explorer, expand the App Runner service node to view your AWS App Runner resources. When your new service has been created successfully, the status automatically updates to Running.