Connect to AWS EC2 from AWS Beanstalk application - amazon-web-services

I am interesting how to connect to MySQL which runs on EC2 instance from application deployed on AWS Beanstalk.
Will be grateful for any help.

Curious why aren't you using the RDS instance instead of EC2? This document explains the step, the process should be pretty much similar as long as your mysql server is up and running:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.RDS.html

Related

How to find out on which EC2 instance is the MSK (managed kafka) running?

I am a kafka newbie. I've to list the topics in the MSK(https://console.aws.amazon.com/msk/home) . I login to msk but there is no console there to run the relevant commands to list the topics. So I am trying to figure out on which EC2 is the MSK running so I can log in that machine. But I've not been able to figure out how to map the relevant EC2 instance to my current running MSK.
MSK is a managed service, which means Amazon manages the servers for you. You don't get access to the underlying servers of managed services on Amazon. If they even use EC2 instances behind the scenes (they probably do) those EC2 servers won't be visible to you.
To list the topics on your MSK cluster, you would need to do something like this from an EC2 server in the same VPC:
bin/kafka-topics.sh --list --zookeeper <zookeeper endpoint>
Where <zookeeper endpoint> is the ZooKeeper endpoint of your MSK cluster.
See the official documentation on this subject here.

Support For Elastic Beanstalk on LocalStack

I am rather new to LocalStack and I am finding it to be extremely useful. The LocalStack GitHub page does not list Elastic Beanstalk as a supported service. Is there any information on whether this will be rolled out anytime soon?
Elasticbeanstalk automatically creates the infrastructure necessary to deploy and run your application in the cloud. For example. it creates EC2 instances, load balancer etc for you.
if you look at localstack, it supports the standalone services such IAM, S3, Dynamodb etc. Therefore I don't think the localstack will ever support elasticbeanstalk as a service.
If you want to simulate running the elasticbeanstalk application locally, you can try running the following the eb cli command. It will run the application in docker.
eb local run

Transfer basic yii2 application on a EC2 instance

I already had an EC2 instance on Amazon (AWS) and a basic yii2 application.
The following were already setup on EC2 Instance:
PHP
Postgresql
Apache2
Now, I want to transfer the yii2 application on EC2 Instance?
Does anyone know the process on how to do it?
Thanks in advance.

How to connect Lightsail with Elasticache

How do we connect AWS Lightsail to Elasticache? I've set VPC peering but that's as far as I get. Anyone knows a step-by-step guide that shows how to do it?
[edit]
We have an application that uses Memcached to persist some data between nodes. The installation currently uses 4 servers: two nodes, 1 RDBMS and 1 Memcached server and is currently running on DigitalOcean servers. Our intention is to install the nodes on Lightsail servers and use AWS services directly from the Lightsail servers, such as RDS and Elasticache.
There are no problems connecting to an RDS MySQL instance from the Lightsail servers but a timeout occurs when trying to attach to the Memcached service. I know it's a security issue, I just can't find any doc that makes that connection work.

Why is application deployed on Amazon Elastic Beanstalk not accessible?

I have deployed Spring MVC & MySQL based application on Amazon Elastic Beanstalk. The RDS instance of MySQL is working perfectly. I deployed my application war on Beanstalk using Tomcat 6 (which is referring to RDS instance) and the EC2 instance is running successfully as per the AWS Management Console intimation but while accessing application URL I am facing the following issue
Error 324 (net::ERR_EMPTY_RESPONSE): The server closed the connection without sending any data.
Note: Availing free services of AWS. I have defined instance type as small for RDS and medium for web application and do have S3 instance with 36mb data.
Could any one suggest me what would be the problem?
I resolved the issue by creating EC2 security Groups to the DB instance.