Category: Amazon AWS

New AWS Feature: Account Colors for Easier Multi-Account Work

AWS has introduced a new Account Color feature that lets you assign colors to accounts in the Management Console. This simple visual cue makes it easier to distinguish production, staging, and development environments — reducing mistakes and speeding up navigation. Learn where to find the setting, how to use it effectively, and see the full list of available colors with their HTML codes.

Read More »

Networking Broken On EC2 Instance Created From Snapshot

Situations have been observed where the network interface will fail to start on an AWS EC2 instance created from a snapshot of another instance. Since AWS EC2 lacks a facility to access the console, it’s not possible to login and fix this condition. One way to solve the problem is to: Stop the new instance. Detach root volume and attach to alternate server. From the alternate server, mount the root volume and edit the network config. Unmount the root volume. Make a snapshot of the root volume. Make an AMI image from the snapshot. Create a new EC2 instance from the AMI. This will work but it takes significant effort and you have to have an available alternate server to mount and fix the root volume. An alternate approach is to use the “User data” feature when creating the EC2 instance to inject a script that fixes the network config.

Read More »

WordFence / CloudFront – Automatically Update Trusted Proxies

If you are using WordPress with CloudFront and WordFence then some extra configuration is required. WordFence does blocking based on IP address but it will fail to determine the correct IP address when you have CloudFront and an Elastic Load Balancer in front of the site. The work around is to setup a cronjob that updates the list of trusted proxies in WordFence. Login to WordPress admin and to to WordFence -> All Options. Under “How does Wordfence get IPs” select “Use the X-Forwarded-For HTTP header”.  Click “Save Changes” Add a cronjob using the script shown below to update the list of trusted proxies. Here’s a simple script for the cronjob:

     

Read More »

AWS Resize Partition

After expanding the size of an EBS volume on an AWS EC2 instance, you’ll need to expand the partition and the filesystem. Here are the steps: Confirm available storage with “lsblk” command. Expand the partition with “growpart” command like “growpart /dev/xvdi 1”. Of course you’ll need to change the device name to match your system. The partition number on the end will be “1” if there is only one partition on the device or can be changed to select a different partition. “growpart” is in the “cloud-guest-utils” package if it’s now already installed. Note that if you have a large  (> 2TB) partition) created with parted then “growpart” may not work. Instead use the “resize” command in “parted”. Confirm new partition size with “lsblk” command. If using LVM then expand the physical and logical volumes: Reread partitions with “partprobe” Resize physical volume with “pvresize /dev/xvdi1” Expand logical volume with “lvextend -l +100%FREE /dev/vg_data2/lv_data2” Resize the

Read More »

AWS ELB Subnet Selection

If you have an AWS VPC with public and private subnets, it’s important to remember to select the public subnets when creating an Elastic Load Balancer. When the public subnets are chosen, replies from instances behind the load balancer are returned through the load balancer. If you instead select the private subnets then reply traffic is routed via the routing table for the private subnet. This results in asymmetric routing which can create a range of problems.

Read More »

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.