w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Elastic Beanstalk's Elastic Load Balancer name
Unfortunately the answer is no to the first 2. The last one, you are able to do it, but it more or less goes against the flow of Elastic beanstalk. You would need to create your own ELB with whatever name you like and then put it in front ot the instance that is created by beanstalk. You would need need to delete the ELB that beanstalk created so that it's not sitting there costing you money. I can't remember if beanstalk boots its environments via an AutoScaling group, but if it does, you'll need to associate that AutoScaling group with your new ELB. After creating and syncing all of that up, you need to point your CNAME to your new custom made ELB. That should work.

Categories : Amazon

how to configure Elastic Beanstalk to deploy code to an instance but not add it to the load balancer
For the most part, though not straight forward, you could provide a .config file in .ebextensions to run your script files. This example of speeding up a deploy shows running some scripts and moving data back and forth. Better yet, the author describes the sequence and deployment process. I'm just embarking on this type of container customization. I have read of others dropping files in the /opt/elasticbeanstalk/hooks/appdeploy/pre and /opt/elasticbeanstalk/hooks/appdeploy/post directories, much of which can be derived by reading the post linked above. Also note that you can include the content of a script in the yaml .config file such as this which I found yesterday: files: "/opt/elasticbeanstalk/hooks/appdeploy/post/99_restart_delayed_job.sh": mode: "000755" owner: root

Categories : Ruby On Rails

How to simulate Amazon's 60 sec timeout on Elastic Load Balancer (ELB) on a local xAMP environment?
This timeout has to do with a request taking more than 60 seconds, without sending any data as a response. Long HTTP requests like this should really be avoided. Even browsers may give up if they dont receive any response within a timeout period. If you can't get rid of long HTTP requests and you need to simulate it. You can use an fcgi/php-fpm configuration of php and provide a timeout of 60 seconds for which the fcgi process will wait for PHP to respond.

Categories : Apache

Nodejs and php in same environment in 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

Categories : Misc

AWS Elastic Beanstalk: .ebextensions to a specific Environment
I don't think there's a simple way to do it in the way you're thinking. You could have the config file run and execute a second script (perhaps cron.sh). Inside cron.sh you can check the environment name and then add the cronjobs accordingly. Haven't tested it, but I think that should work.

Categories : Amazon

aws elastic load balancer not distributing
You need to have the route53 domain direct traffic to the ELB. If you have example.com and are trying to route that to the load balancer you need to associate the apex with the load balancer. To do this, go to the route53 tab. Click your hosted zone and go to record sets. then create a new zone and click yes for alias You then need to associate the hosted zone with your ELB. Now to get the traffic to fail over correctly you need to be running both instances behind the load balancer (preferably in multiple availability zones) and the ELB will take care of the failover. To do this, go to the elb section of ec2. Click your load balancer and add instances to it.

Categories : Amazon

What method(s) do I use to configure/update an Elastic Load Balancer via Java?
My bad. Forgot to execute the requests against the ELB variable. The code below creates the health check and assigns the instances associated with the ELB. Hope this helps the next person asking this question. ConfigureHealthCheckResult healthResult = myELB.configureHealthCheck(healthCheckReq); RegisterInstancesWithLoadBalancerResult registerResult = myELB.registerInstancesWithLoadBalancer(regInst);

Categories : Java

Why am I getting a 502 bad gateway when sending a redirect from behind amazon elastic load balancer?
It turns out that ELB is very picky about what it considers a 'valid' response and will return 502 Bad Gateway if it isn't happy. I fixed it by making sure the response from my server had the following headers: eg. if I was listening at http://example.com I send back the following response: HTTP/1.1 301 Moved Permanently Content-Type: */*; charset="UTF-8" Location: https://example.com/ Content-Length: 0 This makes ELB happy and everything works. For interest, here's the code (Java, using Simpleframework): private static void startHttpsRedirector() throws IOException { org.simpleframework.http.core.Container container = new org.simpleframework.http.core.Container() { @Override public void handle(Request request, Response response) { Path path = reques

Categories : Http

Secure a specific page by client IP behind AWS Elastic Load Balancer
The client IP is actually being passed via header (X-Forwarded-For). This header may include other load balancer IPs in addition to the client IP. If you can configure filtering based on headers, you should be able to do what you are attempting to do.

Categories : Asp Net

Amazon Elastic Load Balancer (ELB) url not resolved by instance attached to it
This is normal, if I correctly understand your testing framework. The way that ELB is scaling, it starts out running on a very small machine, and as traffic increases, it's directed to even larger and larger machines. However, ELB is not configured to handle flash traffic, especially from a small number of hosts, as is the case with a load testing scenario. This is because the DNS record is changed whenever ELB scales, and it sometimes takes a while to propagate. Load testing frameworks sometimes cache the DNS lookup, making things even slower. The official ELB documentation (http://aws.amazon.com/articles/1636185810492479) states that traffic should not be increased by more than 50% every 5 minutes. I found that scaling takes even longer if you're looking to get over 150-200k RPM.

Categories : Wcf

Running nginx infront of a unicorn or gunicorn under Elastic Load Balancer
In a word: yes. Amazon's ELB service is wonderful, but it is solely a load balancer. Running nginx on your own server gives you a locus of control and a place to do rewrites, redirects, compression, header munging, caching, and more. Furthermore it allows you to serve static files in the fastest possible way, rather than using a slot on your more heavyweight appserver.

Categories : Nginx

AWS Elastic Beanstalk + Git Submodules
Which container? Java, Ruby, etc? There are different deployment tools, you aren't just stuck with the command-line eb that is available at aws. I've been working on a config/rake gem (that uses eb_deployer) that I'll be putting out shortly that just uses a zip file, not a git push, so that would work. You might also try ebs-deploy.

Categories : GIT

AWS Elastic Beanstalk and Composer
Composer is already installed default in Beanstalk's PHP AMI. Also consider that container_commands are ran through '/var/app/ondeck' and not on current. Try something like this: container_commands: 01-install-packages: command: "composer.phar install -d /var/app/ondeck/www"

Categories : Amazon

Cronjobs and AWS Elastic Beanstalk
You should configure them through .ebextensions, ask explained here: http://aws.typepad.com/aws/2012/10/customize-elastic-beanstalk-using-configuration-files.html See similar question: AWS Elastic Beanstalk, running a cronjob

Categories : Amazon

Setting up Amazon Elastic Beanstalk app under VPC
This is almost certainly an issue with not being able to communicate with the NAT. The documentation is a little ambiguous when it comes to configuring your .ebextensions config files. Don't mess with the Network ACLs for the VPC. The infrastructure needs to be able to talk to itself. The NAT instance & Beanstalk ELB need to be in the Public subnet (10.0.0.0/24) The Beanstalk instances themselves need to be in the Private subnet (10.0.1.0/24) The Security Group that you apply to the instances needs to also apply to the NAT. That Security Group also needs to be on its own Inbound list so that everything inside that SG can talk to each other. Using curl, try to make outbound calls. First on the Bastion Host, then on the NAT, then on a Beanstalk instance. Are any of them unable to make

Categories : Amazon

Deploying a Laravel 4 app on AWS Elastic Beanstalk
To answer your question regarding the L4 app configuration, you will surely find these posts helpful: L4 cloud deployment problems Laravel and Elastic Beanstalk AWS Environment config As per your question about the "some sort of /app/config/elsatic" thing - Laravel is able to "load" different config, based on the environment it is run in. You can set up different subfolders containing config files, for example for a testing server and production server. That way, you can safely copy files between two servers and dont have to change for example database credentails or basepath every time you sync the files. So here in the article you linked, it's suggested to create a subfolder for the AWS environment so you can have a custom set of configs which will activate if you app is run on AWS.

Categories : PHP

Elastic Beanstalk not creating RDS Parameters
You need a local fallback to a different database in settings. In your settings.py file, replace the DATABASE variable with this: DATABASES = {} try: from local_settings import * except ImportError, e: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': os.environ['RDS_DB_NAME'], 'USER': os.environ['RDS_USERNAME'], 'PASSWORD': os.environ[' 'HOST': os.environ['RDS_HOSTNAME'], 'PORT': os.environ['RDS_PORT'], } } Now create a local_settings.py in the same directory as your settings.py and enter the following code: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'db.djangodb', 'USER': '', 'PASSWORD': '',

Categories : Python

Websocket with Tomcat 7 on AWS Elastic Beanstalk
The solution is to configure the Loadbalacer to connect directly to the Tomcat: Resources: AWSEBSecurityGroup: Type: "AWS::EC2::SecurityGroup" Properties: GroupDescription: "Security group to allow HTTP, SSH and 8080 for all" SecurityGroupIngress: - {CidrIp: "0.0.0.0/0", IpProtocol: "tcp", FromPort: "80", ToPort: "80"} - {CidrIp: "0.0.0.0/0", IpProtocol: "tcp", FromPort: "8080", ToPort: "8080"} - {CidrIp: "0.0.0.0/0", IpProtocol: "tcp", FromPort: "22", ToPort: "22"} AWSEBLoadBalancer: Type: "AWS::ElasticLoadBalancing::LoadBalancer" Properties: Listeners: - {LoadBalancerPort: 443, InstanceProtocol: "TCP", InstancePort: 8080, Protocol: "SSL", SSLCertificateId: "arn:aws:iam::9999999999999:server-certificate/sslcert"}

Categories : Amazon

private key .pem loaded into aws elastic beanstalk (ebs)
First of all, EBS (Elastic Block Storage) is an AWS product which is very different from AWS Elastic Beanstalk. If you start talking to people knowledgeable in AWS, don't use EBS and Elastic Beanstalk interchangeably. :) Elastic Beanstalk is designed to run websites and web applications which you deploy to it. As such, you'll need to add the *.pem file to the application source code that you deploy. Your application should know how to access it from within itself.

Categories : Amazon

Install opencv on aws elastic beanstalk
I am new to beanstalk, but it just seems it is not setting your native requirements properly. Remember that javacv is a layer on top of native OpenCV, so you must have dll/so for the native platform properly installed, and it just seems that beanstalk isn't doing it for you.

Categories : Java

Deploying WAR on Amazons Elastic Beanstalk
The answer to this is not a line or two. I have several tutorials on my own website, among them one on how to deploy a war to AWS using Elastic Beanstalk. It is specific for Grails, but works for any war. Here is a link that will take you to the specific tutorial on my website: how to deploy a war to AWS using Elastic Beanstalk Please note that this link will take you away from stackoverflow and to my website. You can right click the link and say "open in a new tab" to keep stackoverflow open.

Categories : Tomcat

What does 'application' mean in the context of AWS Elastic Beanstalk?
The web application (think web site) would be your final solution to be hosted. It would contain everything you've deemed necessary for the application (php files, html, png, .htaccess etc.). So in short, yes! Also that first sentence in the documentation is boilerplate. A web application is going to have the same context across the board when it comes to development and hosting with Elastic Beanstalk.

Categories : Amazon

Traffic spikes - elastic beanstalk
Yeah, it takes 5-10 minutes (depending on the stack you're using; not counting Windows instances) to launch a new Beanstalk instance via CloudFormation, install and configure the environment software, add the instance to the load balanced cluster, deploy your application code, and run any of your .ebextensions. (All of which you can follow along with by watching the event log for the environment, or the log for the CloudFormation template executing in the background.) There are a couple of ways to handle this: Use larger instances that won't need to scale-out so quickly. Tweak your Auto Scaling triggers for your environment (via the AWS Console, web service API, or CLI tools) so that scale-up happens sooner. That way you'll have the extra capacity by the time the existing servers get ma

Categories : Amazon

HTTP compression in IIS 7.5 on Elastic Beanstalk
I have just enabled <urlCompression doDynamicCompression="true"/> under <system.webServer> section in my web.config and the compression started working as expected.

Categories : Iis

Psycopg2 on Amazon Elastic Beanstalk
Need postgresql-devel in your container. Create a file '.ebextensions/packages.config' with the contents: packages: yum: postgresql94-devel: [] Replace 94 in postgresql94-devel with whatever version of postgres you need. For example, postgresql93-devel for postgres 9.3. http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers-ec2.html#customize-containers-format-packages

Categories : Python

Maintaining session in Elastic Beanstalk
This post on the AWS blog describes how to use DynamoDB to do session state handling using the AWS SDK for PHP. http://aws.typepad.com/aws/2012/04/scalable-session-handling-in-php-using-amazon-dynamodb.html

Categories : PHP

Elastic beanstalk not displaying Web Application
Sounds like to you need to navigate to whatever you set as your start page. Something like, www.mysite.com/Default.aspx If you haven't set up a start page you can right click on your default aspx page in Visual Studio and select "Set as Start Page". If this still doesn't work I recommend you RDP into your instance, open IIS, and make sure your site files are actually being deployed to the server.

Categories : Visual Studio

rails application elastic beanstalk timeout
Your db migration failed to run: [root directoryHooksExecutor info] Executing script: /opt/elasticbeanstalk/hooks/appdeploy/pre/12_db_migration.sh 2013-07-10 14:25:20,500 [INFO] (1759 MainThread) [directoryHooksExecutor.py-29] [root directoryHooksExecutor info] Output from script: Rake task failed to run, skipping database migrations. The easiest way to figure this out, is to deploy again, ssh to the server and manually run the command to see why it failed. This could be because of a number of reasons, including e.g. by default rejecting git repositories in your gemfile (bundle install I recall will run but db:migrate will fail). There are ways around all of this, we just need more information to help.

Categories : Ruby On Rails

Configuring Amazon Elastic Beanstalk with PostGIS
If you want to use geodjango with Amazon Elastic Beanstalk you need to create a custom AMI where you can install PostGIS and then point your Elastic Beanstalk Application to that AMI when spinning up. Here is a good tutorial on how to customize an EBS AMI. There is also an AWS tutorial for that but I found the first one easier to understand. On my custom AMI I installed geos, gdal, proj4 and postgis from source, and postgres using yum install postgres. Below are the commands i used to install all libraries into the AMI. For the django app to find the libraries, I also set an additional environmental variable in the AWS EBS Console. In the menubar of my environment, I went to configuration --> software configuration and edited the Environment Properties by adding the property LD_LIBRARY_P

Categories : Amazon

elastic beanstalk php git eb command line configuaration
I'm not sure what OS you're developing on, so here are several common options: Mac OSX Open .bash_profile in your favorite text editor Add export PATH=$PATH:/eb/linux/python2.7/ to the bottom of this file Save and close Ubuntu (possibly other *nix distros) Open .bashrc in your favorite text editor Add export PATH=$PATH:/eb/linux/python2.7/ to the bottom of this file Save and close Windows Right click on My Computer Click "Advanced System Settings" on the left hand side Click "Environment Variables" at the bottom In "System variables", find the row with "PATH" Click the "Edit" button Add ";/eb/linux/python2.7/" to the end of the "Variable Value" input Click "Okay" repeatedly until all the dialog boxes are closed Here's a youtube video walkthrough to set environment variables in

Categories : PHP

Socket Server in Amazon Elastic Beanstalk
I think, I got this covered. However, I couldn't deploy the Windows Service without errors stand-alone, but only as part of a Web application. Not a real problem in my scenario, though. I have two projects for this scenario; a Web Application and a Windows Service application. On the build server, I create a ZIP file of the Windows Service executables (using zip.exe) On the build server, I upload the ZIP file to an S3 bucket (using s3.exe) On the project of the web application, I create a .ebextensions directory In the .ebextensions directory, I have a whatever.config file that Takes the ZIP file from S3 and unpacks it onto the C-Drive in my preferred directory Calls a batch file (part of the ZIP file) that uninstalls and reinstalls the Windows Service with the InstallUtil.exe utility

Categories : C#

How do I access servlets after deploying to AWS Elastic Beanstalk?
Actually I think you don't need to export your project to a .war file. Are you using Eclipse IDE? Because I could deploy my web application easily through eclipse. Here is the reference link Suggestion: Use Java 1.6 version for you web application. I think EB support JAVA 1.6 pretty good, while I'm not sure whether it works for Java 1.7. Because while I use JAVA 1.7 it works well locally, but I cannot deploy that version on EB.

Categories : Java

scheduled http call on AWS elastic beanstalk
I would set up the cron job to talk to the url, then store result in a MySQL database. Then regular PHP or any other app can connect to MySQL and access the data. That's the suggested way to connect to Twitter since a few months, so you can find info on how to do this floowing search for Twitter connectivity. Hope this helps By the way, while writing an email generating PHP script, I noticed that I have to slow down the pace of email sending to avoid being flagged as spammer. I added a delay of 2 seconds between emails and it did the job. My database was only 2500 so no big deal (except taking care of changing the PHP_MAXEXECUTION time variable)...

Categories : Codeigniter

Elastic Beanstalk cron and deployment permissions
container_commands: 00_fix_script_permissions: command: "chmod u+x /opt/python/ondeck/app/scripts/*" I'm a Linux and AWS Noob, however I found that modifying your command as above did succeed for my use case. /opt/python/current/app/scripts/createadmin now has execute permission for the user

Categories : Shell

How to use conditional in .ebextensions config (AWS Elastic Beanstalk)
I think that the only way to do it is with shell conditions: commands: make-directory: command: | if [ ! -f "${DIR}" ]; then mkdir "${DIR}" fi See bigger example in jcabi-beanstalk-maven-plugin.

Categories : Amazon

How to integrate Atlassian Bamboo with AWS Elastic Beanstalk
It depends a bit on your Bamboo and beanstalk config as well as the type of application you are planning to deploy on AWS Beanstalk. We did some things for Java Web Apps: Since Bamboo understands maven, you can have a look at the following maven plugin: http://beanstalker.ingenieux.com.br/beanstalk-maven-plugin/configurations-and-templates.html We are using it for some environments to create wars and upload them to elastic beanstalk. You can then create a maven task in bamboo to call the plugin. If you downloaded and installed Bamboo on a machine you own yourself you could use the Elastic Beanstalk command line interface (CLI). This is probably the most powerful approach, but you need to install the CLI on the bamboo instance. Then you can do almost anything. This approach should also

Categories : Amazon

How does elastic beanstalk update my Rails database?
You can customize your environment with Elastic Beanstalk Extensions http://ruby.awsblog.com/post/Tx2AK2MFX0QHRIO/Deploying-Ruby-Applications-to-AWS-Elastic-Beanstalk-with-Git

Categories : Ruby On Rails

How to prevent directory listing on AWS Elastic Beanstalk?
I'm not quite sure you can add a configuration file (such as .htaccess) to AWS Elastic Beanstalk. Ofcoure, you can always put an empty file (for example) named index.html in every folder. If someone tries to access this folder he'll reach this page instead of the list.

Categories : Apache

Restrict HTTP Access to Elastic Beanstalk
I have restricted HTTP access to an Elastic Beanstalk application to only certain IP addresses. Following is my procedure. Create new beanstalk environment in the VPC(Amazon Virtual Private Cloud). Please read following documents. Using AWS Elastic Beanstalk with Amazon VPC Example: Launching an AWS Elastic Beanstalk Application in a VPC note: I tried to create a new beanstalk environment(Tomcat) in the VPC using AWS Tookit for Eclipse last month. But I could not create a new beanstalk environment due to the bug of AWS Toolkit for Eclipse. Finally, I could create a new beanstalk environment using a elastic-beanstalk-create-environment command. Therefore I recommend to use elastic-beanstalk-create-environment command. Create a new Network ACL(VPC's function) and open the inbound tab and

Categories : Security

where to place .htaccess on elastic beanstalk python
Apache's AllowOverride is set to None by default. You have to do some .ebextensions touches to change the default AllowOverride on your DocumentRoot folder. You can verify this by connecting to your instance through ssh and check the httpd config.

Categories : Python



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.