elastic-beanstalk

How to deploy private python pip dependency with Amazon AWS Elastic Beanstalk?

非 Y 不嫁゛ 提交于 2019-12-04 19:19:28
When I tried to set one of the services into AWS Elastic Beanstalk , the problem appeared. One of our python pip dependencies set up on private repository was causing errors during deployment process, since it was not accessible for pip process. Bellow I present description how we solved this issue. It is worth to mention that there are other solutions that bind SSH keys used during deployment, to application project git repository. I find them a bit dirty, so I would like to share this one that allows to keep SSH keys separated in S3 bucket, separated from application git repository. Works on

Enabling gzip on Amazon Elastic Beanstalk Windows environment

风格不统一 提交于 2019-12-04 18:17:58
I cannot create a proper deployment package for AWS Elastic Beanstalk to enable gzip compression on Windows IIS environments. I enabled in web config as described here . This worked only for static files, dynamic files are served as is. Anybody have a solution for this? Edit: There is another issue with IIS. It doesn't compress files requested from proxies and also serves the original file on the first request. This causes CDN's to serve uncompressed file because their endpoints caches the original file. Kerem Demirer After struggling 10 hours finally I came up with a solid solution. AWS

enabling cors on a nginx server in ElasticBeanstalk?

核能气质少年 提交于 2019-12-04 18:08:29
Im deploying my Nodejs app to AWS Elastic Beanstalk running nginx. The app is essentially an api, which i can make calls to and retrieve back JSON data i.e. myapi.awselasticbeanstalk.com/api/get_stuff etc. Im trying to enable CORS so i can access the server from my javascript application (the client). As per amazon documentation I can edit or extend the nginx configuration adding a config file to the .ebextensions folder. cors.config files: /etc/nginx/conf.d/cors.conf: mode: "000644" owner: root group: root content: | location / { if ($request_method = 'OPTIONS') { add_header 'Access-Control

Django: Elastic Beanstalk - cannot create new RDS database. [DBSubnets: Invalid option value]

南笙酒味 提交于 2019-12-04 17:20:08
I used eb-create in the EB CLI to spin up a new application environment. However, when I tried to create a new database, it required me to select at least at least two availability zones from a list of four. No matter which two I selected it would stop me with an error using the following language: DBSubnets: Invalid option value [...] Specify the VPC ID and make sure all subnets exist. I tried enabling the same options in the VPC configuration, but I was told this couldn't be done on an existing environment. It took me a while to find the answer, so I am posting it here. The following EB CLI

Best method for inspecting Elastic Beanstalk JVM heap

这一生的挚爱 提交于 2019-12-04 16:58:36
I'm need to get a JVM heap dump from an Elastic Beanstalk server, but the server doesn't have jcmd or jmap. Amazon doesn't natively install them with the JDK. Here's what's installed: [ec2-user@ip-x-x-x-x ~]$ sudo yum list installed|grep jdk java-1.7.0-openjdk.x86_64 1:1.7.0.111-2.6.7.2.68.amzn1 @amzn-updates java-1.8.0-openjdk.x86_64 1:1.8.0.101-3.b13.24.amzn1 @amzn-updates java-1.8.0-openjdk-headless.x86_64 1:1.8.0.101-3.b13.24.amzn1 @amzn-updates What's the best way to get a heap dump from the JVM on Elastic Beanstalk? I have found you can install jmap by installing the correct package:

Deploying Go 1.6 web app to AWS Elastic Beanstalk?

不问归期 提交于 2019-12-04 16:19:54
I want to deploy my web app to elastic beanstalk but it appears to only support Go 1.4 rather than Go 1.6. Is there a way to get a custom image? The reason I want 1.6 is because it supports vendoring and my web app depends on 3rd party packages. The best choice would be to use docker . Here are the steps to deploy your application to Elastic Beanstalk: Choose the Generic Docker platform when creating a new environment. Put a file named Dockerfile in your project root with the following content: FROM golang:1.6.2-onbuild EXPOSE 80 Add a canonical import path to your main.go . For example, if

Run PHP script after deployment on AWS Elastic Beanstalk

余生颓废 提交于 2019-12-04 16:05:02
I've created a PHP script that generates a local.xml file for Magento with the required database settings and credentials. I need to run this after the application is deployed; however I cannot seem to figure out a way to do so. My understanding is that I need to create a .config file inside of a .ebextensions directory. Anyone have a solution? Yup, .ebextensions are what you are looking for. To see how to bundle the source, take a look at the sample applications . There is a PHP one you can look at as well. For more info on .ebextensions , take a look at this page . Here's an example of a

How do I run a Python script that is part of an application I uploaded in an AWS SSH session?

久未见 提交于 2019-12-04 14:31:49
I'm trying to run a Python script I've uploaded as part of my AWS Elastic Beanstalk application from my development machine, but can't figure out how to. I believe I've located the script correctly , but when I attempt to run it under SSH, I get an import error. For example, I have a Flask-Migrate migration script as part of my application (pretty much the same as the example in the documentation ), but after successfully SSHing to my EB instance with > eb ssh and locating the script with $ sudo find / -name migrate.py when I run in the directory ( /opt/python/current ) where I located it with

setup AWSDevTools-RepositorySetup.sh in git repository on ubuntu

↘锁芯ラ 提交于 2019-12-04 14:17:13
I am receiving the following error when I run the setup for AWSDevTools inside my git repo. [[: not found cp: cannot stat /home/user/aws/.git/scripts': No such file or directory` I copied the scripts folder from the AWSDevTools .zip directly to the git repo and then received this error: [[: not found cp: cannot create directory .git/AWSDevTools': No such file or directory` copied AWSDevTools from .zip to the repository as well thinking the installer just wanted these folders in the repo to run but I continued to receive the same directory error. Any help would be great. Assume your repo is at

How to Install PHP IMAP Extension on AWS Elastic Beanstalk Using Configuration Files (.ebextensions)?

佐手、 提交于 2019-12-04 12:56:19
Does anyone know how to install and enable PHP IMAP Extension on AWS Elastic Beanstalk using configuration files (.ebextensions)? I'm using 64bit Amazon Linux 2017.03 v2.4.0 running PHP 7.0.16 I've tried several ways as follow: 1st Way I've tried using files in configuration file but it doesn't work, the configuration filename is phpini.config in .ebextensions directory with below setup: files: "/etc/php.d/phpimap.ini": mode: "000755" owner: root group: root content: | extension=imap.so The additional .ini files parsed into phpinfo() by displaying /etc/php-7.0.d/phpimap.ini but the IMAP won't