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 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

Amazon Elastic Container Registry

amazon docker registry (ECR)

Amazon Elastic Container Registry is used to store docker images in Amazon AWS cloud. To create a repository using awscli command line tool, run aws ecr create-repository –repository-name sok-repository –region ap-southeast-1 In Amazon AWS console, you can see the newly created repository by going to “Elastic Container Registry” page in the region where you created … Read more

Amazon EC2 disk resize No space left on device

On an Amazon EC2 instamce disk usage was full. root@ip-172-31-46-249:/# df -h Filesystem Size Used Avail Use% Mounted on udev 3.9G 0 3.9G 0% /dev tmpfs 791M 8.9M 782M 2% /run /dev/nvme0n1p1 9.7G 9.6G 65M 100% / tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup … Read more

Ubuntu pure-ftpd reply with unroutable address

On AWS Ubuntu server running pure-ftpd, when i try connecting, i get error Status: Server sent passive reply with unroutable address. Using server address instead. To fix this, run echo “30000 50000” > /etc/pure-ftpd/conf/PassivePortRange echo “YOUR_PUBLIC_IP_HERE” > /etc/pure-ftpd/conf/ForcePassiveIP YOUR_PUBLIC_IP_HERE = Replace with your Elastic IP or Public IP (if you don’t have an Elastic IP). … Read more

AWS Elastic Beanstalk

Here are some useful command working with AWS Elastic Beanstalk eb init = initialize environment eb list eb logs eb console = open aws console eb open = open application in web browser eb appversion = show application versions eb health = show health of application eb codesource = select local or codecommit eb deploy … Read more

Deploy Docker Image using Elastic Beanstalk

First create a file docker-eb-run.json with following content { “AWSEBDockerrunVersion”: “1”, “Image”: { “Name”: “bitnami/tomcat” }, “Ports”: [ { “ContainerPort”: “8080” } ] } here i used docker container bitnami/tomcat, you can use any container. Login to AWS Console, go to AWS Elastic Beanstalk page. Click Get Started. On next page, it ask for Application … Read more

Getting Started with Amazon Elastic Beanstalk

AWS Elastic Beanstalk is a PaaS (Platform As Service) allow you to quickly deploy applications. To install AWS Elastic Beanstalk command line tool, run sudo pip install awsebcli Starting your first Project Create a folder with a php file. mkdir ~/www/eb-project-1 cd ~/www/eb-project-1 echo “” > index.php Add our project to git. git init git … Read more