elastic-beanstalk

Permission denied while elastic beanstalk is retrieving S3 file

倖福魔咒の 提交于 2019-11-28 07:38:34
I have files stored on S3 and wrote .ebextensions config to automatically copy the them to new instances. I'm receiving this error in the Elastic Beanstalk console: [Instance: INSTANCEID Module: AWSEBAutoScalingGroup ConfigSet: null] Command failed on instance. Return code: 1 Output: [CMD-AppDeploy/AppDeployStage0/EbExtensionPreBuild] command failed with error code 1: Error occurred during build: Failed to retrieve https://s3-us-west-1.amazonaws.com/ MyBucket / MyFolder /_MyFile.txt : HTTP Error 403 : AccessDenied My .ebextension config file has this section: files: "/target/file/path" : mode:

Worker “dyno” in AWS Elastic Beanstalk

故事扮演 提交于 2019-11-28 07:05:32
Amazon Web Service has now a worker tiers in their Elastic Beanstalk. But, it nevertheless confuse us who come from the days of Worker dyno. As a comparison, in Heroku, one can configure two dynos (something like processor?) each for web and worker. The web will work for any request, and will timeout normally at 15 secs. Thus, if you have a request that last more than that, your request will simply timed-out although not terminated per se. In that case, you should use worker and your web dyno should visit the endpoint several times per minutes (maybe) to check if there is any result to be

aws eb cli 3 sets up application for wrong account

坚强是说给别人听的谎言 提交于 2019-11-28 05:56:44
I have multiple AWS accounts and I'm trying out the new command line interface for elastic beanstalk EB CLI 3. When I run the following command eb init I get prompted for the region (good) and then it asks me to "Select an application to use" where it lists the applications from another AWS account (for staging). If I go ahead and "Create new application" that application will be created in my staging account. Is there some way to configure eb cli3 and get it to use different access keys? You can set up a new profile to use with the EB CLI. Profiles are shared between the AWS CLI and the EB

How to deploy structured Flask app on AWS elastic beanstalk

自古美人都是妖i 提交于 2019-11-28 05:06:48
After successfully deploying a test app using the steps outlined here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Python_flask.html I tried to deploy my actual flask application which has the following structure: myApp/ runServer.py requirements.txt myApp/ __init__.py helpers.py clean.sh static/ myApp.css handlers/ __init__.py views.py templates/ layout.html viewOne.html viewTwo.html Where views.py contains my url mappings. I have tried initializing the eb instance in the root directory as well as within the myApp module and git aws.push but I get the following error

Refresh net.core.somaxcomm (or any sysctl property) for docker containers

大憨熊 提交于 2019-11-28 05:02:34
I am trying to change net.core.somaxconn for docker container to be able to have larger queue of requests for my web application. On OS, outside docker, I first modify the property successfully: $ cat /proc/sys/net/core/somaxconn 128 $ sudo sysctl -w net.core.somaxconn=1024 net.core.somaxconn = 1024 $ cat /proc/sys/net/core/somaxconn 1024 But then I don't know how to propagate that change into docker. I've tried: Also editing /etc/sysctl.conf (in hope of docker reading that file on container launch) Restarting containers sudo docker stop and sudo docker run again Restarting the whole docker

Referencing env variables from Elastic Beanstalk .ebextensions config files

好久不见. 提交于 2019-11-28 04:30:27
Is it posssible to reference the PARAM1 / PARAM2 etc.. container environment properties from the .ebextensions config files. If so, how? I tried $PARAM1 but it seemed to be an empty value. I want to set the hostname on startup to contain DEV, QA or PROD, which I pass to my container via the PARAM1 environment variable. commands: 01-set-correct-hostname: command: hostname myappname{$PARAM1}.com It turns out you can only do this in the container_commands section, not the commands section. This works: container_commands: 01-set-correct-hostname: command: "hostname myappname{$PARAM1}.com" See http

How to change nginx config in amazon elastic beanstalk running a docker instance

喜夏-厌秋 提交于 2019-11-28 04:09:31
After i login and the cookie is set I get error 502. When i read the log i get the error: 014/05/17 01:54:43 [error] 11013#0: *8 upstream sent too big header while reading response header from upstream, client: 83.248.134.236, server: , request: "GET /administration HTTP/1.1", upstream: After some fast googling i found: http://developernote.com/2012/09/how-i-fixed-nginx-502-bad-gateway-error/ and I want to try to set fastcgi_buffers and fastcgi_buffer_size to a different value. But how do i set variable on nginx in amazon elasticbeanstalk? The nginx server is before my docker instance.

Mongos Install/Setup in Elastic Beanstalk

百般思念 提交于 2019-11-28 03:36:48
Looking down the road at sharding, we would like to be able to have multiple mongos instances. The recommendation seems to be to put mongos on each application server. I was thinking I'd just load balance them on their own servers, but this article http://craiggwilson.com/2013/10/21/load-balanced-mongos/ indicates that there are issue with this. So I'm back to having it on the application servers. However, we are using Elastic Beanstalk. I could install Mongo on this as a package install. But, this creates an issue with Mongos. I have not been able to find out how to get a mongos startup going

Websockets with socket.io on AWS Elastic Beanstalk

不羁岁月 提交于 2019-11-27 21:52:01
I'm trying to setup a websocket-server with socket.io on AWS Elastic Beanstalk. Got the initial request to /socket.io/1/?t=xxxx up and running but the websocket handshake fails with this error: WebSocket connection to 'ws://xxxxxx.elasticbeanstalk.com/socket.io/1/websocket/a4DTCN2BeJZuiSaphVyz' failed: Unexpected response code: 502 From googling and looking at the error 502 (Bad Gateway) it seems to have something to do with the nginx-proxy. So how do I configure the nginx to work with websockets? Can't find anything in AWS documentation about setting up for websockets. you could try to go

Nginx config file overwritten during Elastic Beanstalk deployment?

流过昼夜 提交于 2019-11-27 19:32:01
I need to add p3p headers to the static resource location on a standard Nodejs & Nginx Elastic Beanstalk. I've created an ebextension script as explained on this question . The script uses sed to add a add_header directive under the alias line, which is under the static location directive. It runs on the /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf file. The script not only modifies the file, it also copies it to a "safe" location, i.e. /home/ec2-user. According to /var/log/cfn-init.log , the script runs correctly. As evidence, the copy of the modified file shows the additional header at