April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

Categories

April 2024
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  

aws-cli

Description

The AWS Command Line Interface (CLI) is a unified tool to manage your AWS services. With just one tool to download and configure, you can control multiple AWS services from the command line and automate them through scripts.

The AWS CLI introduces a new set of simple file commands for efficient file transfers […]

Swappiness in Linux

Most of Linux users that have installed a distribution before, must have noticed the existence of the “swap space” during the partitioning phase (it is usually found as /sda5). This is a dedicated space in your hard drive that is usually set to at least twice the capacity of your RAM, and along with […]

Install SSM Agent on Ubuntu EC2 instances

sudo apt update sudo apt install snapd sudo snap install amazon-ssm-agent –classic

sudo systemctl start snap.amazon-ssm-agent.amazon-ssm-agent.service sudo systemctl stop snap.amazon-ssm-agent.amazon-ssm-agent.service sudo systemctl status snap.amazon-ssm-agent.amazon-ssm-agent.service

Converting your virtual machine to AWS EC2 AMI

The way to use AWS is not limited to AMI provided by Amazon (or 3rd party/community), but is possible to instantiate an EC2 workload starting from your own image, and converting to AMI.

The steps to create your custom AMI starting from VMware runs through these macro steps:

create VM template (ova)create S3 bucket […]

AWS : SIMPLE SYSTEMS MANAGER (SSM)

What is Simple Systems Manager

Amazon EC2 Simple Systems Manager (SSM) is an Amazon Web Services tool that allows us to automatically configure virtual servers in a cloud or in on-premises data center.

We can use scripts, commands or the Elastic Compute Cloud (EC2) console to manage EC2 instances, virtual machines (VMs) or […]

mysqldump + gzip + aws

A shell script to backup MYSQL database and upload it to Amazon S3.

Note Make sure the AWS CLI is installed properly

mysqldump + gzip + aws Dump the database with mysqldump and gzip it into a folder, later uses the aws command to upload the file to Amazon S3

backup-script.sh

!/bin/bash # # […]

AWS How to Copy EBS Volumes to Different Account

It is common for an organization to have multiple AWS accounts, In my opinion, it’s a best practice to have different accounts for DEV, QA, and PROD environments. One of the reasons, just in case of any security compromise your other accounts would be unaffected.

Managing multiple accounts could be a challenge as well. Recently, […]

How to Fix Redis CLI Error Connection Reset by Peer

Overview

Recently we faced an issue with an AWS ElastiCache Redis instance when trying to test the connections from EC2 Instance using Redis CLI, we faced the following error

$ ./redis-cli -c -h my-redis-server -p 6379 my-redis-server:6379> set a “hello” Error: Connection reset by peer

 

 

Problem

On investigation, we found that the ElastiCache […]

EC2 volume size incorrect

Expanding the Storage Space of an EBS Volume on Linux

[root@data ~]# df -TH Filesystem Type Size Used Avail Use% Mounted on /dev/xvda1 xfs 859G 818G 42G 96% / devtmpfs devtmpfs 4.1G 0 4.1G 0% /dev tmpfs tmpfs 4.2G 0 4.2G 0% /dev/shm tmpfs tmpfs 4.2G 26M 4.1G 1% /run tmpfs tmpfs 4.2G 0 4.2G […]

Adding SSL to Apache on EC2 with Amazon Linux

Adding SSL to Apache on EC2 with Amazon Linux

 

These notes assume you have Apache installed and working on EC2 with Amazon Linux, but it’s fairly similar for other versions of Linux.

Install OpenSSL and the Apache Connector // for Apache 2.2 yum install openssl mod_ssl // for Apache 2.4 yum install openssl mod24_ssl […]