AWS EB CLI Apache - amazon-web-services

Where do you select Apache as the proxy server when creating/deploying from the EB CLI ? I can't seem to find the right command to set the proxy server as apache. It seem to keep wanting to use nginx instead

You set it using .ebextensions option aws:elasticbeanstalk:environment:proxy. Not all environments support it , so you have to make sure that you use the one which supports it (e.g. php).
In the AWS CLI you have --option-settings to set up those options.

Related

AWS EC2 Ubuntu 19. Setting up multiple tinyproxy servers

So I'm trying to set up multiple proxy servers through tinyproxy with ubuntu on AWS. Is there a way to setup it way quicker without having to connect to each instance 1 by 1 and download the packages then setup the server? Thanks!
Seems like you are trying to find a way to run batch commands on multiple instances to provision them.
You can look into SSM Run Command to accomplish this. This will allow you to run Ansible playbooks, Shell commands, etc. on multiple instances based on tags / resource groups / manual selection.
Further reading from AWS regarding Run Command

Add feature to Windows Server Configuration by AWS Elastic Beanstalk

My application uses the WebSocket protocol, and I want to deploy it to the AWS using AWS Elastic Beanstalk. But the pre-build Windows Server configuration not including this protocol by default.
Manually i can enable it by setting according item in the Server Manager via Add Roles and Features Wizard (Web Server (IIS) -> Web Server -> Application Development -> Web Socket Protocol).
If I want my app to work, i need connect by RDP and manually check in this option. But it is a terrible approach..
I think this task can be accomplished by deploy setting (.ebextensions)? But how can i get it?
I would be very grateful for the answer!
Add .ebextensions to your EB environment and customize your server software
You may want to customize and configure the software that your
application depends on. These files could be either dependencies
required by the application—for example, additional packages or
services that need to be run.
For your needs use commands option:
Use the commands key to execute commands on the EC2 instance. The
commands are processed in alphabetical order by name, and they run
before the application and web server are set up and the application
version file is extracted.
The specified commands run as the Administrator user.
For example this command will install WebSocket protocol feature:
%SystemRoot%\system32\dism.exe /online /enable-feature /featurename:IIS-WebSockets
in .ebextensions config it may look like:
commands:
01_install_websockets_feature:
command: "%SystemRoot%\\System32\\dism.exe /online /enable-feature /featurename:IIS-WebSockets"
ignoreErrors: true

Do I have to install AWS CLI in each server?

I have multiple standalone servers from where I want to upload/sync directories to Object Storage usign AWS CLI.
Do I have to install AWS CLI in each server? OR is there a common console/platform provided within AWS Object Storage from where I can call the same command over something like say SSH. How can I avoid installing cli to all the servers?
You have to install AWS CLI in all the servers even if you write the script to ssh from a single server that which is installed AWS CLI, SSH protocol will take the configuration from the remote server, not from a server where the script is running. It's better if you use a configuration management tool like ansible to speed up the process.

How to retrieve running version from ElasticBeanstalk app instance?

I'm running a web server app in ElasticBeanstalk, using single Docker container config. I want to retrieve the current Running Version of the ElasticBeanstalk App somehow. I hoped there will be predefined environment variables from EB but there are none that could help.
Is there a programatic way to retrieve it from within the container?
EB CLI: you can use EB CLI for this. "eb status" command will list out the status of your current EBS app. You can filter your required parameters from the output.
http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-cmd-commands.html
AWS API: You can also use "DescribeApplicationVersions" in AWS API to get the version.
http://docs.aws.amazon.com/elasticbeanstalk/latest/api/API_Operations.html
Basically you would need to upload the script or program in your docker container and run it for the container. Invoke the script in your dockerfile so that it does your job.

Drupal with Amazon Web Services?

I'm not sure if this is the write place to ask, but this is the only site I know where I get my questions answered... anyways
I wanted to install drupal but where should I host it? Can amazon web service host this such application? Do I need to go somewhere else and host it? I do have an account with inmotionhosting, but I was thinking if Amazon does the job, why not just use it? Any thoughts and opinions?
You can install Drupal on AWS EC2 if you have sys admin experience. Otherwise you will need to use a managed platform, like Cloudways, for that. Configuring web server like Apache and Nginx, cache like Varnish and Memcached and other features on AWS is little difficult. Many managed servers have those features available in their platform so you don't have to configure anything or go through long process of installing application on AWS.
Amazon Web Services (AWS) will host Drupal no problem.
The service you're looking for is Amazon Elastic Compute Cloud (Amazon EC2). It's pretty much equivalent to a private server with which you can do almost whatever you want (Web hosting included). The downside is that you have to do all the setup yourself.
If you don't know how to install Apache or configure your own Linux machine, you'd probably be better off with managed hosting where they'll set everything up for you.
You can also just use AWS Cloudformation to set up your drupal environment. It's a service that is part of AWS that will set up your stack for you. you may still need to know how to handle your config files but at least you do not have to go into installing the DB , Apache etc all manually.
http://aws.amazon.com/cloudformation/
Bitnami provides a free (Apache-licensed) pre-built Drupal image for AWS that you launch easily. It is great for quickly testing something but if you choose the right instance for your expected load, also for production (disclaimer: I am a cofounder of Bitnami, though as I mentioned the image is open source)
Drupal can be deployed and hosted automatically on Jelastic PaaS. You won't need to configure it from scratch. And if you wish to make some custom settings while installation, you can also easily install it manually. Both variants are described in the guide.
As a result, you'll get automatic scaling, pay-per-use pricing, management via intuitive UI, a wide choice of local service providers from different countries and other options to run your Drupal effectively.