I have deployed my app using aws elastic beanstalk and want to access those file on the instance. Is there anyway to do that ? I am able to login to my instance.
I used find command to trace the file location but could not find it.
If yes, what is the path where all deployed class files will be present ?
Related
I use Elastic Beanstalk for our NodeJs application. Sometimes an error message like this appears when I update some configurations like capacity:
Incorrect application version "release#016a2cd2-598187446" (deployment 34). Expected version "release#016a2cd2-598187446" (deployment 33).
I don't understand the error. The application version is the same. How can i fix this problem?
I have try to terminate EC2, rebuild the envinroment but the problem remain.
A few possible solutions:
Check that you are using the correct Elastic Beanstalk URL. The URL for your Elastic Beanstalk environment will be in the format "http://xxxxxx-env.elasticbeanstalk.com". Make sure that you are using this URL, and not the URL for your S3 bucket (which will be in the format "http://xxxxxx.s3.amazonaws.com").
If you are using a custom domain name for your Elastic Beanstalk environment, make sure that you have updated your DNS settings to point to the correct Elastic Beanstalk URL.
Make sure that you have deployed your application to the correct Elastic Beanstalk environment. You can check this by going to the "Elastic Beanstalk" tab in the AWS Management Console and selecting the environment that you want to deploy to. If you have multiple environments, make sure that you select the one that matches the URL that you are using.
Currently I have setup my yii2 website on AWS Elastic beanstalk. I followed following steps :
Created Elastic Beanstalk app and environment : Platform PHP 7.0, RDS database
Created SSH connection from EC2 instance of elastic beanstalk using putty with .pem file
In Apache folder I have cloned my yii2 git repo using (sudo git clone repo_url) command
Installed composer using this link https://gist.github.com/asugai/6694502
Run command : (sudo composer install) in my repo folder
Edited common/config/main-local.php and made db connection
And run migration using (sudo php yii migrate)
Setup a domain for this elastic beanstalk app
Now I don't know how should I proceed further and I am facing following problems :
Elastic Balance loader is creating new instance and terminating current one when it fails or health goes in severe.
Due this, my all data in that instance is lost. To make it work I am doing all steps again and again manually.
How can I make my domain https (SSL certified)
How can make easy process to pull new changes from git
I already have a working site in nodeJS. which is using elastic beanstalk, elastic balance loader, RDS(postgres), S3 bucket, cloudfront for Route 53, SSL certificate (https), code pipeline, code commit. And AWSCLI at local to deploy nodeJS app.
my question is about I want to use same flow for yii2 advance app.
Can anyone please help me here?
Thanks in advance :)
In an AWS elasticbeanstalk instance, where are the node.js app files deployed to? I wanted to ssh to the machine and debug some issues and wanted to check that the files were deployed correctly. I checked /var/ but didn't see an app directory there.
It's in the /tmp/deployment/application folder during deployment and then it is moved to /var/app/current.
The node logs are in /var/log/nodejs/nodejs.log
I'm new to aws and am having some issues with getting my mobile app back running again. Forgive me if this question seems vague.
For a school project we created a mobile app on aws and deployed using docker containers (another student managed these tasks). When trying to get my own key pair to ssh into my ec2 instance i detached the volume associated with my instance and reattached it after getting my own key pair. Now i can ssh into my instance but my front end cant talk to my web server.
So my question is, do i create a new application on elastic beanstalk to deploy my app? Even though when i run lsblk is shows a have a docker loop device and when i run docker images i see several that match the name of my application? or do i somehow get the container running again, docker run doesn't seem to be working.
No need, just upload a new update into Elastic Beanstalk. AWS will handle the rest.
FYI, Elastic Beanstalk - Single Docker Container update process (simple under the hood):
You upload the update into AWS.
AWS will put it on your S3.
Inside your EC2, there is an Elastic Beanstalk agent. It will check for a new update.
If there is an update, the agent will download the update file and extract it.
The agent will build a new Docker image.
If the build is success, it will generate a new config to tell Nginx (web proxy) the new web server container.
Nginx will be reloaded.
Your old docker container will be destroyed.
Don't change anything inside EC2 of Elastic Beanstalk, except you know what you do. Elastic Beanstalk is design for automate deployment and scaling. So, if you change something in your EC2 manually, it might be lost. Of course, you can modified your EC2 instance, but you need to automate it using .ebextensions or take an image.
I am using github (public) to keep track of my web app and about to deploy it to Elastic Beanstalk. Is there a good way to keep my config file secure which has RDS username/password? I have to add the file to git in order to push it to Elastic Beanstalk but this will make my password visible to everyone on github...? Any suggestions? Thanks!
Your intuition is correct! Definitely keep your keys/passwords/credentials out of your committed codebase.
Elastic Beanstalk provides environment variables in the control panel for just this purpose. The official documentation can be found here: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html#command-options-ruby
These environment variables can be edited through the Elastic Beanstalk UI.
You can then reference these variables in your .yml config files, e.g. password: <%= ENV['PARAM1'] %>.