AWS route 53 configured to point to Elastic BeanStalk URL - amazon-elastic-beanstalk

I'm a bit confused on how the Elastic BeanStalk url works. From what I understand Elastic BeanStalk is just a management layer. Yet I have I have a route 53 alias which seem to point to the URL section of an Elastic Beanstalk environment url, which in turn has a load balancer. I'm not sure/confused on how the request can go from route53 into an Elastic Beanstalk url, shouldn't it go to the load balancer?

Related

How to redirect HTTP to HTTPS from Classic Load Balancer in AWS

We have a web application developed in Asp.NET MVC Core 3.1. Deployed it using Elastic Beanstalk.
Configured Classic load balancer for this with AWS issued certificate listener. Our classic load balancer's listeners configured as below.
Using this setting, its not redirecting from Http to Https. However if we try to access website individually with Https and Http its working fine.
We don't want to change Load Balancer Type from Classic to Application as the environment is already setup in Route S3 too.
Can you please help if anything missing in this?

Amazon Route 53 Domain Name, linking to Elastic Beanstalk

I have purchased a domain (deepalgorithm.net), however I am a bit curious as to how I would route all traffic that visit this domain to my Amazon Elastic BeanStalk instance, which is running my web application.
Secondly, how can I make it so that , when users type this link "deepalgorithm.net" it takes them to my web application.
You need to put Elastic Load Balancer in front of your application and point record in Route53 to the ELB
https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-elb-load-balancer.html
Since you got the domian in Route53, there is an entire section in the AWS docs devoted to setting up the routing:
Routing traffic to an AWS Elastic Beanstalk environment
The process involves creating a Route 53 record to your EB domain:
Creating an Amazon Route 53 record that routes traffic to your Elastic Beanstalk environment

send https from AWS lambda to AWS elastic beanstalk servers

I am struggling to enable an AWS lambda to send HTTPS POST requests to an AWS elastic beanstalk service.
The elastic beanstalk provides web and web services and works nicely.
The lambda is doing some calculations with AWS elasticache (works well) and then decides if to send HTTPS POST to the beanstalk URL.
The lambda is written with node.js. About 2 minutes after the POST attempt I am getting this timeout:
[Error: connect ETIMEDOUT X.Y.Z.W:443] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect', address: 'X.Y.Z.W', port: 443
I see no indication of a request in the elastic bean nginx access log.
So my understanding is that the security groups are not set correctly.
I ruled out the option that the elastic beanstalk prevents such connections - The lambda is using a url with an external domain name that can be used from any browser and that works fine.
So I am left with the conclusion that the lambda security prevents this connection. So - I opened up the lambda security group completely to "All traffic" from anywhere - and I still get this problem.
Any ideas?
You are running your Lambda function within your VPC, which is required to access your ElastiCache servers. However once you place a Lambda function into a VPC it no longer has access to anything outside the VPC. You are trying to hit the Elastic Beanstalk server via a public (Internet) address, which the Lambda function does not have access to. Thus you are getting network connection timeouts.
You need to configure your Lambda function to access the service via an internal VPC address. And you need to configure your Elastic Beanstalk Security Group to allow access from the Lambda Security Group (if you haven't already).
Alternatively, you could add a NAT Gateway to your VPC, which would give your Lambda function access to resources outside the VPC.

why is elasticbeanstalk url not accessible whereas loadbalancer url for the same environment is?

I have an elastic beanstalk setup but the url that's listed in the environment is not accessible, whereas if I point to the url of the load balancer I can access it.
Any suggestions ?
Attach the LoadBalancer security group to the instance. For me it worked. I found ELB has different security group that is not attached to instance.
Or you can create one Security Group with HTTP port 80 open and attach it to ELB and Instance from the beanstalk configuration
Go to Elastic Beanstalk configuration then go to VPC settings. Check the "Associate Public IP Address". Then it worked for me.

Nodejs and php in same environment in aws Elastic beanstalk

I have a application where I have both nodejs and php codes. nodejs is used to run several scripts required by the application. How do i deploy such application using aws Elastic beanstalk?
There are two ways to accomplish
Amazon Beanstalk recommended way#1:
Use Configuration File to install nodejs. Configuration File scripts
will be executed during Beanstalk EC2 instances start up.
Legacy way#2:
Customizing an Elastic Beanstalk AMI to install nodejs and fill your
Custom AMI ID in Beanstalk Environment Setting.
References:
1.Customizing and Configuring AWS Elastic Beanstalk Environments
2.Using Custom AMIs