Step 5: Deploy your application - AWS App2Container

Step 5: Deploy your application

After your application has gone through containerization, it's ready to deploy to Amazon ECS, Amazon EKS, or App Runner, if eligible. When you run the generate app-deployment command, App2Container creates an Amazon ECR repository where it stores your application container artifacts for deployment. It also creates deployment configuration files that you can deploy as follows:

  • You can customize the deployment files, and have complete control over the deployment by running the AWS commands for your destination container management environment. When you run the generate app-deployment command without the --deploy option, App2Container returns instructions that you can use to deploy manually.

  • If you're sure that you won't need to customize your deployment files, App2Container can optionally deploy your application containers directly to the container management environment that you have configured. To choose this option, run the generate app-deployment command with the --deploy option. You can verify the settings that App2Container used for the deployment by reviewing the deployment configuration files.

The deployment phase includes the option to create a deployment pipeline using the generate pipeline command. That step is not covered here, in order to prevent any unexpected charges for AWS resources. For more information, see app2container generate pipeline command in the command reference section.

Choose the tab that matches your operating system (OS) platform to continue:

Linux

Run the generate app-deployment command as follows to deploy the application on AWS.

$ sudo app2container generate app-deployment --application-id java-app-id

You have now created deployment artifacts for your application! You can find the deployment artifacts that the generate app-deployment command created for you in the local directory for your application.

Windows

Run the generate app-deployment command as follows to deploy the application on AWS.

PS> app2container generate app-deployment --application-id iis-smarts-51d2dbf8

You have now created deployment artifacts for your application! You can find the deployment artifacts that the generate app-deployment command created for you in the local directory for your application.

Applications using Windows authentication

For applications using Windows authentication, you can use the gMSAParameters inside of the deployment.json file to set the gMSA-related artifacts automatically during generation of your AWS CloudFormation template.

Perform the actions in the list below once per Active Directory domain before you update the gMSA parameters.

  • Set up a secret in SecretsManager that stores the Domain credentials with the following key value pairs:

    Key Value
    Username <DomainNetBIOSName>\<DomainUser>
    Password <DomainUserPassword>
  • For the VPC with the Domain Controller, verify that the DHCP options are set to reach the Domain Controller. The options for DomainName and DomainNameServers must be set correctly. See DHCP options sets for more information about how to set DHCP options.