Access AWS Node SDK inside firewall without changing any configuration in firewall - node.js

I have a desktop app which downloads app assets after installation is completed.
App uses aws node sdk to download all the assets from S3 buckets.
Problem comes when app is getting installed inside company firewall. Company firewall blocks the api request used by aws node sdk.
And I can't ask all my client to white-list amazon web service urls but I can ask them to white-list my own company url like *.mycompany.com.
Is there any way we can access aws node sdk using my company domain.

We had this same problem and resolved it by creating a proxy API endpoint on a separate server that would take the request, and pipe the stream from AWS S3 back to the client. Because this proxy endpoint was hosted in a whitelisted domain, we didn't have to worry about the company's firewall blocking the request.

Related

How to convert http to https API URL deployed in AWS

I have deployed a Python Flask based app in AWS. It is running fine on http://<ip>. I need to convert this to https. I have sent request for admin to enable port 443 for https.
Will that automatically make my app to https or do I need to install or setup something else to make it happen?
You have multiple choices for this;
Use ACM (Easiest?!):
if you're using AWS loadbalancers, you can create a certificate using ACM service and assign it to your loadbalancer and modify your Target Groups in EC2 panel.
If you are using cloudfront, you can also configure your SSL/TLS there. (Not changing the loadbalancer and target groups). It will work as an upper layer.
Use other certificate providers excluding AWS ACM:
You can setup something like Lets Encrypt or use Cloudflare services.
Note: it really depends on how your cloud stack currently is, you maybe be only deploying on EC2 Server and having Nginx configured and having everything else done outside of AWS with other services or you can have Lets Encrypt certificate on your ALB.
This post just gives you some keywords, you can search and see exact instruction/tutorial for every solutions.

How to add HTTPS on the EBS link on aws?

I have deployed my frontend in S3 bucket. backend is on EBS. bucket is secured with https but backend api's are not so frontend is not able to connect with the api's. i wanted to add HTTPS for the api's on EBS. i have generated Certificate for the domain name also. i have created a load balancer for the ec2 where my api's are deployed but still i'm not able to connect with it. i have set the Security groups groups also which routes the traffic from port 80 to 443. i don't know where i'm doing wrong or which step i'm missing.
Need help to know the full process and how this all mess is connected with each other.

How to create https endpoints for Azure Service Fabric on local machine using HttpSys?

I'm trying to create https endpoints for three apps in a cluster of Service Fabric. Because I have more than one app I use HttpSys. So far I worked only on http but requests from frontend are from a secure transmission(https) so I have to put my backend on https.
I tried to follow this 1 but it doesn't work with WebListener so I move the implementation to HttpSys.
I don't have any errors and my cluster is working well but when I try to access my https endpoint I get nothing.

Project in S3 bucket doesn't connect to node server in EC2 instance

AWS newbie here. I have a web app where the Angular dist package is hosted in an S3 bucket, and the backend is being served on an EC2 instance. I've been following this tutorial, but after completion my project in the S3 bucket still does not connect to my remote node server.
What I understood from that tutorial was that by setting up a CloudFront distribution, it will connect the S3 bucket with the EC2 instance. But if I navigate to the CloudFront domain, it loads the S3 bucket contents but still does not connect to my node server.
When I run the node server locally, it connects successfully and I'm able to read and write to my remote Mongo database. This indicates that:
1) the connection to the remote MongoDB is successful, and
2) the front end (in the S3 bucket) is looking for a local node server instead of the remote one (in the EC2 bucket).
So my question is how do I make it so that my services make calls to the remote server instead?
Firstly S3 only hosts static content. So all your Angular dist files will sit on S3. S3 does not connect to your backend. Your browser will try to make AJAX rest calls to your Node Server.
Second your backend Node server needs to expose its Rest services via an API gateway. Thats the recommended approach. It seems if your app is trying to connect locally because of config error. You need to use the API gateway link in your Angular app.
For a quick test you could expose the port in the Security Group of your EC2 and use the public IP of your EC2 to access the node app before going about setting up API gateway.

Azure service management api 403 forbidden when use network proxy

I did a console application to manage the azure server using the azure service management rest API. And I followed the instructions from http://msdn.microsoft.com/en-us/library/windowsazure/gg651127.aspx to create certificate, upload to azure under subscription level. import to local My(personal) folder. everything works well. I can get the hosted services. create new host service.
but when I used a web proxy on my machine. the response always be 403 Forbidden. I tried to set the proxy in HttpWebRequest, but still the same error.
Also, I run this console application in a aws EC2 and have the same 403 Forbidden error(maybe EC2 also use proxy?).
Suppose the proxy server should forward the web request to azure management rest API server with the certificate, but I guess it's not. someone told me maybe this certificate only self generated and not valid. so the proxy server refused it. not sure if that is the cause.
Azure Management APIs require signed headers. Some proxies makes changes (add/modify) header tags which would then invalidate the signature and cause the 403.
w.r.t. EC2 - did you install your management certificate on the VM? Without it the request will fail with a 403.
One of the suggestions is to use Fiddler to compare the request before & after the proxy. That will tell you what (if anything) is changing.

Resources