Deploy sails.js app in Amazon EC2 - amazon-web-services

I installed NodeJS and sails in my EC2 server and used sails lift with no errors.
When I'm trying to access PUBLIC_IP:1337, I get ERR_CONNECTION_TIME OUT message.
I also added the following inbound rule to a new security group:
Is there anything I'm missing?

Related

Error: connect ECONNREFUSED 3.15.138.43:8080 do I need IAM AWS_ACCESS_KEY_ID?

I am new to docker,linux and AWS I followed this great tutorial(part 1 and 2 below) to dockerize a flask app and deploying to EC2.
https://dev.to/aminu_israel/build-and-deploy-your-machine-learning-application-with-docker-5322
https://dev.to/aminu_israel/dockerize-and-deploy-your-machine-learning-application-on-aws-5160
Yet still I get this Error: connect ECONNREFUSED everytime I try to do the POST request in Postman or the Curl Request but the app works perfectly in localhost.
Here are my inbound rules security settings in EC2 since I saw this was a typical point of confusion(i tried all combinations)
Inbound rules
Outbound rules
NACL INBOUND
NACL OUTBOUND
All my ports seem to align properly
Container running in EC2 Instance
These and other tutorials mention nothing about IAM AWS_ACCESS_KEY_ID or AWS_SECRET_ACCESS_KEY but they still got apps to deploy.Do I need this somewhere in my dockerfile or in the terminal?If so can you give a an example?Or these settings aren't necessary to deploy?I can't sleep :(

Cannot deploy using AWS code deploy : too few healthy instances are available for deployment

I am trying to deploy an application to an ec2 instace from s3 bucket . I created an instance with the required s3 permimssion and also a code deploy application with required ec2 permissions
When I try to deploy thought I get :
The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems. (Error code: HEALTH_CONSTRAINTS.
I shh into the ec2 instance to check the code deploy log and this is what I get in the :
2018-08-18 20:52:11 INFO [codedeploy-agent(2704)]: On Premises config file does not exist or not readable
2018-08-18 20:52:11 ERROR [codedeploy-agent(2704)]: booting child: error during start or run: Errno::ENETUNREACH - Network is unreachable - connect(2) - /usr/share/ruby/net/http.rb:878:in `initialize'
I tried changing the permissions , restarting the code deploy agent , creating a brand new codeDEploy application. Nothing seems to work.
In order for the agent to pick up commands from CodeDeploy, your host needs to have network access to the internet, which can be restricted by your EC2 security groups, VPC, configuration on your host, etc. To see if you have access, try pinging the CodeDeploy endpoint:
ping codedeploy.us-west-2.amazonaws.com
Though you should use the endpoint for the region your host is in - see here.
If you've configured the agent to use the proxy config, you may have to restart the agent like here.

AWS unable to connect to Java springboot API endpoints

I am trying to run my springboot API on AWS however when i try to connect to the endpoint the error Site cannot be reached IP refused to connect. This my first time working with AWS.
I created a linux instance and connected to it using filezilla. Afterwards i added my jar to a folder which i created on the linux instance using filezilla. I started the springboot project and its running but the problem is that i cannt seem to connect to the endpoints. Am i missing something, how do i connect to my endpoints.
The other thing to note is that i enabled https on my API and added swagger also.
You need to enable relevant ports in the instances' Security Group.
Look at this to create a new Inbound rule for the specific port.
You can go to the aws console, (here I am assuming you have deployed to us-east-1 if its something else, go to the relevant region.
Open up the relevant security group, and then click edit Inbound roles.

Locust: Web Interface from AWS instance

I just started using Locust, installed on a AWS instance and it is working fine. But I am unable to get to the web interface. Port 8089 is open in the AWS security group.
http://ec2-XX-XX-XX-XX.eu-west-1.compute.amazonaws.com:8089 is not working for me.
Any advice?
The best way to run Locust on AWS is Elastic Beanstalk, follow these steps: https://blogs.aws.amazon.com/application-management/post/Tx351HCZ9D1RQ84/Using-Locust-on-AWS-Elastic-Beanstalk-for-Distributed-Load-Generation-and-Testin

unable to launch a phonegap web app on aws ec2 instance

Could someone please guide me as to how I can launch my app on the EC2 instance? I have created the instance. I am able to connect using SSH. I have also uploaded my files to the instance. I am using Ubuntu as my OS. I have checked and reset the Security Groups rules to accept all traffic as both inbound and outbound traffic rules for my running instance. I am unable to move to next step where I would ideally be launching my app on the browser. I have also installed Apache server and made sure it is running. Am I missing something? I can see my files in the /var/www/html folder when I navigate through the terminal. How can I launch the index.html through the instance?
Any help would be appreciated.