Terraform template to enable Snapshot on EBS volumes of Instances created by ASG

This note will explain, how to configure scheduled Snapshot of attached EBS volumes using terraform, Cloudwatch Events with builtin target EC2 CreateSnapshot API. We can use Cloudwatch event to schedule snapshot of EBS volume. For this we need to create Schedule based Cloudwatch Event Rule with Specific Cron expression. Then attach EC2 CreateSnapshot API target…

Manage AWS API logs with CloudTrail and Graylogs

General Process: Cloudtrail will send all API logs to S3 bucket And will notify to SNS topic SNS will send log details to SQS queue Graylog will poll message from SQS and get the logs from that S3 file By default all logs will be sent to “All Messages” stream. Stream can be used to…

Configuring SSL in Tomcat & AWS Elastic Load Balancer (ELB)

Steps to configure SSL in Tomcat & integrate it with AWS Elastic Load Balancer (ELB) 1. Create Keystore using keytool.2. Generate Certificate Signing Request (CSR)3. Get RootCertificate, Intermidiate Certificate & Public Certificate. 4. Import above certificates in keystore 5. Configure keystore in tomcat 6. Integrate SSL certificate with AWS ELB – – Generate RSA Private…

Configure Elastic IP Failover between EC2 instances in AWS

Configuring Failover cluster between 2 EC2 instances is bit tricky. We can achieve Failover between 2 EC2 by configuring Elastic IP Failover. In AWS we can associate Elastic IP to an EC2 instance. Using this Elastic IP we can connect to the associated instance using terminal. We can configure basic Failover of EIP using below…

MySQL incremental backup on S3 Storage bucket

Steps to take incremental backup of MySQL database and upload it on S3 bucket: 1. Enable binary loging in mysql for our database. Added below entries in /etc/my.cnf under [mysqld] log-bin=mysql-bin-log binlog-do-db=Database_name expire_logs_days=2 max_binlog_size=100M 2. Restart mysql server systemctl restart mysqld 3. Installed s3cmd & configured it yum install s3cmd s3cmd –configure Enter AWS access_key…