Open terminal and download terraform using the following command: sudo apt-get update wget https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip sudo unzip ./terraform_0.11.13_linux_amd64.zip -d /usr/local/bin/ terraform -v Now, create terraform script and run the following command to instance: nano terraform.tf provider “aws” { region = “rerion” access_key = “accesskey” secret_key = “secretkey” } resource “aws_instance” “example” { ami = “ami-8803e0f0” instance_type…
Author: Sandip Patel
Install Cloudwatch agent on on-premises Linux server
Configure AWS CLI in your machine using the following command: sudo apt install awscli Create access key and secret key of any user in your AWS account and provide it in your machine using below command: aws configure Now download and install cloudwatch agent on linux host: wget https://s3.amazonaws.com/amazoncloudwatch-agent/ubuntu/amd64/latest/amazon-cloudwatch-agent.deb sudo dpkg -i -E ./amazon-cloudwatch-agent.deb Now,…
Deploy Flask website using AWS CLI with AWS Lambda, AWS API Gateway and Zappa
Prerequisites: Python pip virtualenv awscli To deploy a Flask website, first create a virtual environment using below commands in cmd terminal… >mkdir demo >cd demo demo> virtualenv <name_virtualenv> demo> %HOME_Path%\ <name_virtualenv> \Scripts\activate To check environment is now active like below: (<name_virtualenv>) C:\> Now, Install all necessary dependencies in a virtual environment (<name_virtualenv>) C:\> pip install flask (<name_virtualenv>) C:\> pip install…
Deploy Django website using AWS Elastic Beanstalk CLI in windows
Prerequisites: Python pip virtualenv awsebcli To deploy a Django website, first create a virtual environment using below commands in cmd terminal… >mkdir demo >cd demo demo> virtualenv <name_virtualenv> demo> %HOME_Path%\ <name_virtualenv> \Scripts\activate To check enviroment is now active like below: (<name_virtualenv>) C:\> Now, Install django in virtual environment (<name_virtualenv>) C:\> pip install django (<name_virtualenv>) C:\>…