Posts

Showing posts with the label Amazon Ec2

Amazon AWS Filezilla Transfer Permission Denied

Answer : To allow user ec2-user (Amazon AWS) write access to the public web directory (/var/www/html), enter this command via Putty or Terminal, as the root user sudo : chown -R ec2-user /var/www/html Make sure permissions on that entire folder were correct: chmod -R 755 /var/www/html Doc's: Setting up amazon ec2-instances Connect to Amazon EC2 file directory using Filezilla and SFTP (Video) Understanding and Using File Permissions if you are using centOs then use sudo chown -R centos:centos /var/www/html sudo chmod -R 755 /var/www/html For Ubuntu sudo chown -R ubuntu:ubuntu /var/www/html sudo chmod -R 755 /var/www/html For Amazon ami sudo chown -R ec2-user:ec2-user /var/www/html sudo chmod -R 755 /var/www/html In my case the /var/www/html in not a directory but a symbolic link to the /var/app/current, so you should change the real directoy ie /var/app/current: sudo chown -R ec2-user /var/app/current sudo chmod -R 755 /var/app/current I hope th...

AWS - How To Install Java11 On An EC2 Linux Machine?

Answer : Another option might be running the following commands: In order to install java 11: sudo amazon-linux-extras install java-openjdk11 For java 8 you can try: sudo yum install java-1.8.0-openjdk Finally, if you want to switch between java versions run: sudo alternatives --config java Use one of the OpenJDK distributions: https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html or https://adoptopenjdk.net/?variant=openjdk11&jvmVariant=hotspot

504 Gateway Timeout - Two EC2 Instances With Load Balancer

Answer : What web server are you using? I had a very similar issue with nginx and AWS load balancing. I added keepalive_timeout 75s; to the http block in my nginx config file and haven't see the issue since. Make sure you restart nginx after you add and save that line (on ubuntu sudo service nginx restart . On redhat stop nginx /path/to/nginx/executable -s stop then /path/to/nginx/executable to start up nginx) This fix was recommended by AWS on their help page AWS Load balancer troubleshooting First, what is the Idle Timeout for your ELB set to? You'll find it at the very bottom of the "Description" tab for your load balancer. You can read more about the idle timeout here in the ELB documentation. The default is 60 seconds. You should also consider setting or increasing Keep-alive in your web server. How you do that will depend on what web server you are using. Second, if you think it's due to the client being switched from one instance to the ot...

AWS Elasticache Timeout From EC2

Image
Answer : I think the problem is about security groups of your instance. To the best of my knowledge you need to allow the traffic on the security group associated to your EC2 instance. If you are using memcached the port is 11211 if redis the port is 6379 Try to have a look to the AWS official documentation. http://docs.aws.amazon.com/AmazonElastiCache/latest/UserGuide/GettingStarted.AuthorizeAccess.html I hope this helps somehow. First, check the instance security group and check port 6379 is allowed in Inbound. After that, check your default VPC security group and add inbound rule Custom TCP Rule-6379-Anywhere and save. I hope this will fix the issue. Actually solution is to add security group to elasticache cluster, and this security group should allow 6379 port.

AWS ECS Private And Public Services

Image
Answer : The combination of both AWS load balancer ( for public access) and Amazon ECS Service Discovery ( for internal communication) is the perfect choice for the web application. Built-in service discovery in ECS is another feature that makes it easy to develop a dynamic container environment without needing to manage as many resources outside of your application. ECS and Route 53 combine to provide highly available, fully managed, and secure service discovery Service discovery is a technique for getting traffic from one container to another using the containers direct IP address, instead of an intermediary like a load balancer. It is suitable for a variety of use cases: Private, internal service discovery Low latency communication between services Long lived bidirectional connections, such as gRPC. Yes, you can use AWS ECS service discovery having all services in a private subnet to enable communication between them. This makes it possible for an E...

Amazon Linux AMI Vs Ubuntu

Answer : Amazon Linux AMI is a red hat based distro so things like the package installer or the tools for service manage are different, and another thing you need to consider is the way of bootstraping, amazon instances are more flexible to do some things in cloudformation in the ubuntu way the best form to do it is with cloudinit https://help.ubuntu.com/community/CloudInit, you need to consider the packages too are multiple packages that not are native supported by Amazon Linux.