Move Elastic IP from one AWS Account to Another

AWS Elastic IP is a static, public IPv4 address that you can allocate and associate with your AWS resources, such as Amazon EC2 instances and Network Interface. It provides a persistent public IP address that remains associated with your resources even if they are stopped or restarted. Transferring an AWS Elastic IP address to another … Read more

How to Upgrade PHP on Bitnami WordPress in AWS Lightsail

I have an old Bitnami WordPress server on the Amazon Lightsail server. Bitnami does not support upgrading the PHP version. The recommended solution is to create a new bitnami WordPress instance and migrate the website to the new lightsail instance. Since this server had many websites configured, I do not want to migrate the websites … Read more

How to Open Port in Amazon EC2 instance

By default Amazon EC2 only allow port 22 (SSH) on Linux servers and port 3389 (RDP) on Windows Instances. All other ports are closed for security reasons. Depending on your use case, you may need to open ports on the security group to allow connection to applications you run on the EC2 instance. Log in … Read more

How to export Amazon Route 53 DNS Zone

To export DNS Records for a domain, you can use AWS CLI. First, you need to make an Access key to use with AWS CLI. To configure AWS CLI, run the command aws configure You need to enter “Access Key ID:” and “Secret Access Key”. You can generate these in the AWS console by clicking … Read more

Amazon Lightsail Log in failed – CLIENT_UNAUTHORIZED

Amazon Lightsail connect failed

When trying to log in to Amazon Lightsail instance, I got the error This lightsail refused to connect error happens because when you update the system, you replaced the default /etc/ssh/sshd_config file provided by Amazon AWS. To fix the error, connect to the Lightsail server using SSH (terminal on Linux/Mac, putty on windows), edit the … Read more

Copy files from one Amazon S3 bucket to another

Amazon S3 is a cheap object storage service from Amazon AWS. You can use aws-cli to copy files between S3 buckets. To install aws-cli, check post How to Install Amazon AWS awscli. To copy files from one Amazon S3 bucket to another, you can use the command aws s3 sync “s3://source-bucket-name/” “s3://destination-bucket-name/” If you only … Read more

How to find Amazon S3 bucket size

To see the disk usage of an Amazon S3 bucket, do the following 1) Click on the bucket name 2) Click on Metrics 3) On Next Page, you will see S3 bucket disk usage. In this case, the bucket size is 39.3 MB. Method 2: Using calculate size Click on objects. It will show all … Read more

Google Kubernetes Engine get credentials

Before you can run kubectl commands on Google Kubernetes Engine, you need to get credentials, this is done with command gcloud container clusters get-credentials CLUSER_NAME_HERE –zone ZONE_HERE To use gcloud commands, you need to login to google cloud first using command gcloud auth login See Google Kubernetes Engine