Skip to content

Latest commit

 

History

History
87 lines (64 loc) · 3.94 KB

05_deploy_aws.md

File metadata and controls

87 lines (64 loc) · 3.94 KB

ToDo:

  • [x]

AWS setup: How to deploy ML models in a AWS VM?

  1. Get a free AWS account:

AWS free tier account creation.

Account type.

  1. Sign in to AWS Console.

  2. Setup budget.

  3. Navigate to EC2 Service.

    • Once logged in, navigate to the EC2 service by searching for "EC2" in the search bar at the top of the console.
  4. Launch Instance.

    • In the EC2 Dashboard, click on the "Launch Instance" button to start the process of launching a new virtual machine.
  5. Select an Amazon Machine Image (AMI).

    • Choose an Amazon Machine Image (AMI) from the available options. For a free tier eligible instance, you can choose an image labeled "Free tier eligible" in the AMI selection page.
    • Select an Ubuntu image

VM image.

  1. Choose an Instance Type.
    • Select the desired instance type that falls under the free tier eligible category. You can review the details and specifications of each instance type to choose the one that suits your requirements. The "t2.micro" instance type is the only free available.

Free tier elegible instance.

  1. Configure Instance.

    • Configure the instance details, such as the number of instances to launch, network settings, and storage options. Allow SSH traffic and HTTPS traffic from the internet.
  2. Add Storage.

    • Specify the storage options for your instance. The default storage size is usually sufficient for basic usage, but you can adjust it according to your needs. We use 30GB in this case.

Configure storage.

  1. Create a Key Pair.

    • In the key pair selection page, choose to either create a new key pair or use an existing one. If creating a new key pair, follow the instructions to download the private key file (.pem). This key pair is required to connect to your instance via SSH.
  2. Review and Launch.

    • Review all the settings you have configured for your instance. Double-check if everything looks correct, and then click on the "Launch" button to proceed.
  3. Wait for the virtual machine to be provisioned.

    • Once it is ready, you can find its details on the EC2>Instances dashboard, including its public IP.
  4. Access your Instance via SSH.

    • Once the instances are launched, you can connect to them using SSH. Open your terminal or SSH client and use the downloaded private key file to establish an SSH connection to your instance. The command typically looks like this:
    ssh -i /path/to/private_key.pem username@public_ip
    • Replace /path/to/private_key.pem with the actual path to your private key file, username with the appropriate username (depending on the chosen AMI), and public_ip with the public DNS name or IP address of your instance.
    • See also Step 3
  5. Clone repository. See 03_deploy_general.md: Step 4

  6. Set Up the Environment. See 03_deploy_general.md: Step 5

  7. Run the API. See 03_deploy_general.md: Step 6

  8. Access the API. See 03_deploy_general.md: Step 7