AWS Copilot

Basics

  • CLI tool used to build, release and operate production-ready containerized apps.

  • This tool makes it seamless to run apps in Apprunner, ECS and Fargate.

  • This tool used cloud formation to create the infrastructure.

  • Can be integrated with Code pipeline, so that automated deployments can be done.

Commands

  1. Initialize copilot

        copilot init
  2. Create an environment using copilot, which will create a manifest file.

        copilot env init --name <env_name> --profile <profile_name> --app <app_name>
    
        ## profile_name can be set to default

    Note : Before running the above command make sure that aws configuration file is already created, can be done so by below command.

        touch /home/ec2-user/.aws/config
  3. Deploy the environment using the manifest file, created based on environment.

        copilot env deploy --name prod

    Note : For above command to successfully execute make sure the user executing this have the right roles and access.

  4. To deploy the application

        copilot deploy
  5. To delete the infrastructure

        copilot app delete

Reference

Last updated