elastic-beanstalk


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.

Related Links

AWS CodeDeploy?
Elastic Beanstalk randomly goes offline
How to enable parse server rest api
How to deploy config.json on elastic beanstalk
Error in AWS ElasticBeanStalk python 27 application that was running fine
Using elastic ip for amazon's ElasticBeanstalk instance
Creating custom scaling trigger for elastic beanstalk
Failing to deploy flask app on AWS Elastic Beanstalk environment
Elastic Beanstalk IAM developer permissions
Elastic beanstalk not using reserved instance
Updating AWS Elastic Bean has encountered a . How to resolve this?
How to automatically remove instances in EB whose status OutOfService is?
chmod configuration in elastic beanstalk
Where can I find elastic beanstalk “instance health for details”
Elastic Cache stuck in creating state
How to get Elastic Beanstalk to send notifications for all log messages?

Categories

HOME
typescript
document
groovy
tcl
jsessionid
mocha
akka.net
range
android-vision
bluej
chart.js2
fbx
imp
jmespath
pywin32
collision
multiprocessing
haml
realm-java
rgdal
broker
eonasdan-datetimepicker
digital-logic
slf4j
italic
iar
c++builder-5
silverlight-5.0
skyscanner
blockui
nib
google-crawlers
solid-principles
csr
automata-theory
formatdatetime
project-centennial
tern
spark-submit
ase
pulseaudio
mobile-browser
adal.js
uifont
psycopg2
xbrl
orchestrate
ternary
untagged
android-camera-intent
dr-memory
kombu
surroundscm
codeigniter-upload
sqlfiddle
balsamiq
xmllint
oracle-policy-automation
jstorm
vb6-migration
cucumber-java
relaxng
ssha
aldryn
python-2.3
rdotnet
julian
realm-list
java-client
gcovr
spiceworks
chatjs
bit.ly
iqueryable
jquery-mobile-popup
django-endless-pagination
appstore-sandbox
deap
ioerror
sugar.js
scrollpane
route-me
icon-fonts
cloud-hosting
locomotivejs
hiphop
mysql-backup
tipsy
duplicate-data
facebook-authentication
mkreversegeocoder
winamp
apache-config
keylogger
code-statistics

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App