Writing files to AWS Elastic Beanstalk









up vote
0
down vote

favorite












I have developed a web application with a Node.js backend on a local machine using Webstorm IDE. Among other things, the application creates a new unique folder and writes 7 javascript (.js) files to this folder during runtime each time a user requests a new account. Everything works properly in the local development environment.



When the application is uploaded and deployed to AWS Elastic Beanstalk, and a new user is requested though the application web page, I am receiving the following 404 (Not Found) error in the browser's Developer, JavaScript Console. The same error appears for each of the 7 files. The number 1541877962401 is the unique folder name generated by the application when a user requests a new account and user.js is one of the 7 javascript files copied to this newly created folder. savedUser is an existing folder in the file structure and is not created during runtime.



GET http://sowtest082-env.stsvxa672t.us-east-1.elasticbeanstalk.com/savedUser/1541877962401/user.js net::ERR_ABORTED 404 (Not Found)



I am guessing that the application does not have the correct permissions to create the folder and/or files in AWS?



Within the context of the Elastic Beanstalk environment, what is the best method to create a folder and copy javascript files to this folder during runtime? It is fairly easy to restructure the location of the folder and the files within it in the development environment so as to match the ASW EB environment. Reengineering the application to store the contents of these files in an AWS MySQL database engine would take a lot more work.



Bye the way, these 7 files are not tmp files and they are not config files...



Thanks...










share|improve this question























  • It's unusual that you would distribute account-specific JavaScript files around your web server in response to an account being created. Why do you need to do this, rather than drive behavior through account configuration?
    – jarmod
    Nov 10 at 20:52










  • Not sure why you would say it's unusual? What exactly is unusual about it?
    – Customsoft
    Nov 10 at 21:27










  • If I understand correctly (and I may not), you seem to be storing state on the Elastic Beanstalk instances which is not ideal. Compute instances are fungible. The fact that that state is a collection of JavaScript source files is not something you see very often. Do you genuinely have a multi-tenanted system that dynamically generates JS code that's specific to each customer?
    – jarmod
    Nov 10 at 22:31










  • Yes, definitely agree. There needs to be a separation of the business logic (data) and application logic. Question was (and is) how to do this within an AWS EB environment. Cheers...
    – Customsoft
    Nov 12 at 17:34











  • It might help if we understood why you are dynamically writing JavaScript files whenever an account is created. What is in these JS files?
    – jarmod
    Nov 12 at 17:49














up vote
0
down vote

favorite












I have developed a web application with a Node.js backend on a local machine using Webstorm IDE. Among other things, the application creates a new unique folder and writes 7 javascript (.js) files to this folder during runtime each time a user requests a new account. Everything works properly in the local development environment.



When the application is uploaded and deployed to AWS Elastic Beanstalk, and a new user is requested though the application web page, I am receiving the following 404 (Not Found) error in the browser's Developer, JavaScript Console. The same error appears for each of the 7 files. The number 1541877962401 is the unique folder name generated by the application when a user requests a new account and user.js is one of the 7 javascript files copied to this newly created folder. savedUser is an existing folder in the file structure and is not created during runtime.



GET http://sowtest082-env.stsvxa672t.us-east-1.elasticbeanstalk.com/savedUser/1541877962401/user.js net::ERR_ABORTED 404 (Not Found)



I am guessing that the application does not have the correct permissions to create the folder and/or files in AWS?



Within the context of the Elastic Beanstalk environment, what is the best method to create a folder and copy javascript files to this folder during runtime? It is fairly easy to restructure the location of the folder and the files within it in the development environment so as to match the ASW EB environment. Reengineering the application to store the contents of these files in an AWS MySQL database engine would take a lot more work.



Bye the way, these 7 files are not tmp files and they are not config files...



Thanks...










share|improve this question























  • It's unusual that you would distribute account-specific JavaScript files around your web server in response to an account being created. Why do you need to do this, rather than drive behavior through account configuration?
    – jarmod
    Nov 10 at 20:52










  • Not sure why you would say it's unusual? What exactly is unusual about it?
    – Customsoft
    Nov 10 at 21:27










  • If I understand correctly (and I may not), you seem to be storing state on the Elastic Beanstalk instances which is not ideal. Compute instances are fungible. The fact that that state is a collection of JavaScript source files is not something you see very often. Do you genuinely have a multi-tenanted system that dynamically generates JS code that's specific to each customer?
    – jarmod
    Nov 10 at 22:31










  • Yes, definitely agree. There needs to be a separation of the business logic (data) and application logic. Question was (and is) how to do this within an AWS EB environment. Cheers...
    – Customsoft
    Nov 12 at 17:34











  • It might help if we understood why you are dynamically writing JavaScript files whenever an account is created. What is in these JS files?
    – jarmod
    Nov 12 at 17:49












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have developed a web application with a Node.js backend on a local machine using Webstorm IDE. Among other things, the application creates a new unique folder and writes 7 javascript (.js) files to this folder during runtime each time a user requests a new account. Everything works properly in the local development environment.



When the application is uploaded and deployed to AWS Elastic Beanstalk, and a new user is requested though the application web page, I am receiving the following 404 (Not Found) error in the browser's Developer, JavaScript Console. The same error appears for each of the 7 files. The number 1541877962401 is the unique folder name generated by the application when a user requests a new account and user.js is one of the 7 javascript files copied to this newly created folder. savedUser is an existing folder in the file structure and is not created during runtime.



GET http://sowtest082-env.stsvxa672t.us-east-1.elasticbeanstalk.com/savedUser/1541877962401/user.js net::ERR_ABORTED 404 (Not Found)



I am guessing that the application does not have the correct permissions to create the folder and/or files in AWS?



Within the context of the Elastic Beanstalk environment, what is the best method to create a folder and copy javascript files to this folder during runtime? It is fairly easy to restructure the location of the folder and the files within it in the development environment so as to match the ASW EB environment. Reengineering the application to store the contents of these files in an AWS MySQL database engine would take a lot more work.



Bye the way, these 7 files are not tmp files and they are not config files...



Thanks...










share|improve this question















I have developed a web application with a Node.js backend on a local machine using Webstorm IDE. Among other things, the application creates a new unique folder and writes 7 javascript (.js) files to this folder during runtime each time a user requests a new account. Everything works properly in the local development environment.



When the application is uploaded and deployed to AWS Elastic Beanstalk, and a new user is requested though the application web page, I am receiving the following 404 (Not Found) error in the browser's Developer, JavaScript Console. The same error appears for each of the 7 files. The number 1541877962401 is the unique folder name generated by the application when a user requests a new account and user.js is one of the 7 javascript files copied to this newly created folder. savedUser is an existing folder in the file structure and is not created during runtime.



GET http://sowtest082-env.stsvxa672t.us-east-1.elasticbeanstalk.com/savedUser/1541877962401/user.js net::ERR_ABORTED 404 (Not Found)



I am guessing that the application does not have the correct permissions to create the folder and/or files in AWS?



Within the context of the Elastic Beanstalk environment, what is the best method to create a folder and copy javascript files to this folder during runtime? It is fairly easy to restructure the location of the folder and the files within it in the development environment so as to match the ASW EB environment. Reengineering the application to store the contents of these files in an AWS MySQL database engine would take a lot more work.



Bye the way, these 7 files are not tmp files and they are not config files...



Thanks...







amazon-web-services amazon-elastic-beanstalk






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 10 at 20:24

























asked Nov 10 at 20:18









Customsoft

3018




3018











  • It's unusual that you would distribute account-specific JavaScript files around your web server in response to an account being created. Why do you need to do this, rather than drive behavior through account configuration?
    – jarmod
    Nov 10 at 20:52










  • Not sure why you would say it's unusual? What exactly is unusual about it?
    – Customsoft
    Nov 10 at 21:27










  • If I understand correctly (and I may not), you seem to be storing state on the Elastic Beanstalk instances which is not ideal. Compute instances are fungible. The fact that that state is a collection of JavaScript source files is not something you see very often. Do you genuinely have a multi-tenanted system that dynamically generates JS code that's specific to each customer?
    – jarmod
    Nov 10 at 22:31










  • Yes, definitely agree. There needs to be a separation of the business logic (data) and application logic. Question was (and is) how to do this within an AWS EB environment. Cheers...
    – Customsoft
    Nov 12 at 17:34











  • It might help if we understood why you are dynamically writing JavaScript files whenever an account is created. What is in these JS files?
    – jarmod
    Nov 12 at 17:49
















  • It's unusual that you would distribute account-specific JavaScript files around your web server in response to an account being created. Why do you need to do this, rather than drive behavior through account configuration?
    – jarmod
    Nov 10 at 20:52










  • Not sure why you would say it's unusual? What exactly is unusual about it?
    – Customsoft
    Nov 10 at 21:27










  • If I understand correctly (and I may not), you seem to be storing state on the Elastic Beanstalk instances which is not ideal. Compute instances are fungible. The fact that that state is a collection of JavaScript source files is not something you see very often. Do you genuinely have a multi-tenanted system that dynamically generates JS code that's specific to each customer?
    – jarmod
    Nov 10 at 22:31










  • Yes, definitely agree. There needs to be a separation of the business logic (data) and application logic. Question was (and is) how to do this within an AWS EB environment. Cheers...
    – Customsoft
    Nov 12 at 17:34











  • It might help if we understood why you are dynamically writing JavaScript files whenever an account is created. What is in these JS files?
    – jarmod
    Nov 12 at 17:49















It's unusual that you would distribute account-specific JavaScript files around your web server in response to an account being created. Why do you need to do this, rather than drive behavior through account configuration?
– jarmod
Nov 10 at 20:52




It's unusual that you would distribute account-specific JavaScript files around your web server in response to an account being created. Why do you need to do this, rather than drive behavior through account configuration?
– jarmod
Nov 10 at 20:52












Not sure why you would say it's unusual? What exactly is unusual about it?
– Customsoft
Nov 10 at 21:27




Not sure why you would say it's unusual? What exactly is unusual about it?
– Customsoft
Nov 10 at 21:27












If I understand correctly (and I may not), you seem to be storing state on the Elastic Beanstalk instances which is not ideal. Compute instances are fungible. The fact that that state is a collection of JavaScript source files is not something you see very often. Do you genuinely have a multi-tenanted system that dynamically generates JS code that's specific to each customer?
– jarmod
Nov 10 at 22:31




If I understand correctly (and I may not), you seem to be storing state on the Elastic Beanstalk instances which is not ideal. Compute instances are fungible. The fact that that state is a collection of JavaScript source files is not something you see very often. Do you genuinely have a multi-tenanted system that dynamically generates JS code that's specific to each customer?
– jarmod
Nov 10 at 22:31












Yes, definitely agree. There needs to be a separation of the business logic (data) and application logic. Question was (and is) how to do this within an AWS EB environment. Cheers...
– Customsoft
Nov 12 at 17:34





Yes, definitely agree. There needs to be a separation of the business logic (data) and application logic. Question was (and is) how to do this within an AWS EB environment. Cheers...
– Customsoft
Nov 12 at 17:34













It might help if we understood why you are dynamically writing JavaScript files whenever an account is created. What is in these JS files?
– jarmod
Nov 12 at 17:49




It might help if we understood why you are dynamically writing JavaScript files whenever an account is created. What is in these JS files?
– jarmod
Nov 12 at 17:49

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243054%2fwriting-files-to-aws-elastic-beanstalk%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53243054%2fwriting-files-to-aws-elastic-beanstalk%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

27

Top Tejano songwriter Luis Silva dead of heart attack at 64

Category:Rhetoric