Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Is it possible to update a file in AWS Elastic Beanstalk without deploying a new version?

Posted on 2016-11-14
Medium Priority
Last Modified: 2016-11-17
I'm attempting to tweak a .htaccess file for an AWS Elastic Beanstalk "application." The only instructions I have been able to find on the AWS support site requires one to zip the files and upload them via the Environment/Running Version/Upload and Deploy interface which appears to restart services after uploading. This takes several minutes.

Is it possible to update just the .htaccess file via FTP without "redeploying"?

My objective is to get Apache to process a .js file as PHP because I have two dynamic javascript documents. I can't find the exact AddHandler code. I've tried the following unsuccessfully.
AddHandler x-httpd-php5 .js
AddHandler application/x-httpd-php5 .js

Open in new window

The reason I have these dynamic javascript documents is to overcome the cross-domain limitations of AJaX.

If you happen to know the correct AddHandler code, that would be just as helpful. Or a way to overcome cross-domain limitations with AJaX would also be helpful.
Question by:Kim Walker
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 111

Accepted Solution

Ray Paseur earned 2000 total points
ID: 41887676
Here's my AddHandler.  I expect you could just add .js to this list.
AddHandler x-httpd-php .html .htm

Open in new window

LVL 22

Author Closing Comment

by:Kim Walker
ID: 41889209
Thanks Ray. I decided to go for broke and added several possibilities. Apparently one of them worked. If I have a need to modify any pages, I might try to narrow down the correct one. It's such a pain to have to zip ALL the files and upload them all every time one of them needs modifying. Here's what I ended up with:

Options +ExecCGI
AddHandler x-httpd-php5 .js
AddHandler x-httpd-php .js
AddHandler application/x-httpd-php5 .js
AddHandler application/x-httpd-php .js
AddHandler php5-script .js
LVL 22

Author Comment

by:Kim Walker
ID: 41892509
For the record, my final .htaccess code for AWS Elastic Beanstalk is:
Options +ExecCGI
AddHandler php5-script .js

Open in new window

I still haven't determined if there is a way to update individual files in AWS Beanstalk without uploading the entire site.

Featured Post

Looking for the Wi-Fi vendor that's right for you?

We know how difficult it can be to evaluate Wi-Fi vendors, so we created this helpful Wi-Fi Buyer's Guide to help you find the Wi-Fi vendor that's right for your business! Download the guide and get started on our checklist today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is intended for those who are new to PHP error handling (  It addresses one of the most common problems that plague beginning PHP develop…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question