elastic-beanstalk

AWS Elastic Beanstalk using PHP with Private Composer Repositories

家住魔仙堡 提交于 2019-11-30 14:08:22
How do I utilize private composer repositories when deploying with Amazon AWS Elastic Beanstalk in a PHP environment? Specifically using GitHub (Q & A style, answer following) We needed to use a private library for one of our PHP projects we were deploying via AWS's Elastic Beanstalk (EB). This private library is hosted on GitHub, although similar git hosting (your own server, BitBucket, etc.) probably has similar authentication and could use this solution for deployment. We used SSH credentials to get at the private git repository. Since we are using GitHub, we used GitHub's Deploy Keys (

AWS CLI create RDS with elasticbeanstalk create-environment

守給你的承諾、 提交于 2019-11-30 13:54:20
How can I create an RDS instance with the create-environment or another subcommand of aws elasticbeanstalk ? I've tried several combinations of parameters to no avail. Below is an example. APP_NAME="randall-railsapp" aws s3api create-bucket --bucket "$APP_NAME" APP_VERSION="$(git describe --always)" APP_FILE="deploy-$APP_NAME-$APP_VERSION.zip" git archive -o "$APP_FILE" HEAD aws s3 cp "$APP_FILE" "s3://$APP_NAME/$APP_FILE" aws --region us-east-1 elasticbeanstalk create-application-version \ --auto-create-application \ --application-name "$APP_NAME" \ --version-label "$APP_VERSION" \ --source

Django and Elastic Beanstalk URL health checks

随声附和 提交于 2019-11-30 13:44:24
I have a Django webapp. It runs inside Docker on Elastic Beanstalk. I'd like to specify a health check URL for slightly more advanced health checking than "can the ELB establish a TCP connection". Entirely reasonably, the ELB does this by connecting to the instance over HTTP, using the instance's hostname (e.g. ec2-127-0-0-1.compute-1.amazonaws.com ) as the Host header. Django has ALLOWED_HOSTS which validates the Host header of incoming requests. I set this to my application's external domain via environment variable. Unsurprisingly and entirely reasonably, Django thus rejects ELB URL health

Deploy multiple applications to a single EC2 instance using AWS Elastic Beanstalk

我们两清 提交于 2019-11-30 13:01:46
I am have deployed a .Net website to AWS Elastic Beanstalk. I want to now deploy another .Net web project (a web service) to the same EC2 instance that was created by AWS Elastic Beanstalk, but the selection to "use and existing environment" in the Environment page of the publishing wizard is greyed out. Is there a way to do this? Update: This is now possible https://aws.amazon.com/about-aws/whats-new/2016/08/aws-elastic-beanstalk-supports-asp-net-core-and-multi-app-net-support/ No. .Net deployment has some limitations on EB compared to the other frameworks. You cannot deploy multiple

Where to put Elastic Beanstalk config commands that are only run once on spin-up?

青春壹個敷衍的年華 提交于 2019-11-30 11:33:52
I know I can put commands in my source code in .ebextensions/*.config using the commands array. These are executed on every deploy however. What about if I want to execute a configuration command only once when spinning up a new instance? Commands can be run conditionally using the test: modifier. You specify a test to be done. If the test returns 0, the command is run, otherwise it is not. If the last command in your config file touches a file, and the commands above that you only want to run once check for the existence of that file, then those commands will only run the first time. commands

Unable to install AWS Elastic Beanstalk CLI (Win10, Python 3.6, Pip 9.0.1)

﹥>﹥吖頭↗ 提交于 2019-11-30 11:13:23
I am trying to install awsebcli on my machine and I am unable to run the command eb --version It shows this error: 'eb' is not recognized as an internal or external command, operable program or batch file. This is my Python version: C:\>python --version Python 3.6.0 This is my pip version: C:\>pip --version pip 9.0.1 from c:\users\amirs\appdata\local\programs\python\python36\lib\site-packages (python 3.6) When I ran this command pip install --upgrade --user awsebcli to install awsebcli it successfully installed it. Here are my environment variables for PATH: Adrian Seeley After a great deal of

How can I install matplotlib for my AWS Elastic Beanstalk application?

橙三吉。 提交于 2019-11-30 09:49:46
I'm having a hell of a time deploying matplotlib on AWS Elastic Beanstalk. I gather that my issue comes from some dependencies and the way that EB deploys packages installed with PIP, and have attempted to follow the instructions here on SO for resolving the issue. I first tried incrementally deploying, as suggested in the linked answer, by adding pieces of the matplotlib package stack to my requirements.txt file in stages. But this takes forever (for each stage) and is prone to failure and timing out (which seems to leave build directories behind that stall subsequent package installations).

AWS Elastic Beanstalk and PHP sessions

谁都会走 提交于 2019-11-30 09:20:41
I currently have a php application in development on an AWS EC2 instance but I've decided to move it to Elastic Beanstalk to take advantage of the autoscaling functionality. While most of the application migrated to the new Elastic Beanstalk EC2 instances flawlessly, I'm running into an issue regarding php sessions. It seems that the php session save path is unwritable, according to the following message generated by php: Warning: Unknown: open(/var/lib/php/5.5/session/sess_uc1dpvmoq5fikcv0q2kogker15, O_RDWR) failed: Permission denied (13) in Unknown on line 0 Warning: Unknown: Failed to write

How to read Elastic Beanstalk Environment Properties in .net?

帅比萌擦擦* 提交于 2019-11-30 08:52:04
How can I read the Environment Properties from my AWS Elastic Beanstalk Application found here: Configuration > Software Configuration > Environment Properties None of the following approaches work: ConfigurationManager.AppSettings["MyServiceUrl"] ConfigurationManager.AppSettings["aws:elasticbeanstalk:application:environment.MyServiceUrl"] Environment.GetEnvironmentVariable("MyServiceUrl") Environment.GetEnvironmentVariable("aws:elasticbeanstalk:application:environment.MyServiceUrl") The 'fully qualified' name attempt comes from the AWS EB documentation . Any ideas? In your .ebextensions

Can't access HTTPS site on Elastic Beanstalk after configuring HTTPS in the load balancer

こ雲淡風輕ζ 提交于 2019-11-30 08:13:46
I have a standard Elastic Beanstalk app set up and running great over HTTP. There is one EC2 instance (for now), and the domain is configured with a CNAME pointing to the load balancer. Following the instructions in the AWS documentation , I inputted the SSL certificate and configured the load balancer as such: Load balancer protocol: HTTPS Load balancer port: 443 Instance protocol: HTTP Instance port: 80 Cipher: [default] SSL certificate: myCert The changes look like they have been applied; in the load balancer description, I see: Port configuration: 80 (HTTP) forwarding to 80 (HTTP)