How to deploy Express rest api in AWS and also configure ec2 instance, point subdomain and run https in ec2 - express

I have build a Express REST API.I tried to deploy aws ec2 instance and did configure the instance public ip point subdomain (hostinger or godaddy) then run subdomain via ec2 instance enable https to the API
I will call the subdomain in React Client it will runs Express API or any possible way to run my express api in subdomain
Anybody can explain step by step or share any resources

Related

Azure Traffic manager gives SSL error while App gateway URL works while using Azure App gateway ingress controller on AKS

We are going multi-region for our project and there is a need for us to use an Azure traffic manager to route traffic to each region. Our setup looks like below where our app gateway is exposed via a public IP which I used to configure on the Azure Traffic Manager.
My issue is when I hit the traffic manager URL it give me an SSL cert error, while if I hit the App gateway URL directly it works fine on HTTPS. Looking at the below error I know I need to configure the traffic manager certificate and my question is
Is this needs to be configured somewhere in the traffic manager? OR
DO we need to configure this in the application gateway and change the app gateway ingress in Kubernetes with and also use traffic manager certificate there?
• The traffic manager works at the DNS level, thus as the DNS records pointing to the traffic manager’s public URL aren’t setup correctly, you are getting this error when browsing the traffic manager’s URL. Also, when you are accessing the application gateway URLs independently, they are being accessed successfully as the URLs for the application gateways are hosted on the Azure DNS and independent public IPs are also allotted against their DNS records. Thus, appropriate DNS records to route the DNS access request for the traffic manager’s website need to be updated.
• Since you are using multi region setup in Azure with load balancing features, I am considering that your custom domain and its DNS records are setup in Azure itself. And the URLs for the application gateway are setup as separate endpoints in the form of subdomains in the custom DNS record setup itself. Thus, when you browse the application gateway URLs according to the custom domain URL setup, you can access the application page correctly. With respect to the traffic manager, you will need to create a CNAME record pointing from your custom domain to the ‘*.trafficmanager.net’ domain, while also creating a CNAME record pointing from your custom domain to your generic application gateway URLS.
• Once done, create A host records for each application gateway endpoint pointing to the public IP address assigned by Azure to them. After doing the above, your traffic manager URL should be able to route and redirect the application access requests correctly. For more information, please refer to the community discussion below which specifies the exact details relating to your problem: -
Azure Traffic Manager SSL Setup (not classic)

Aws S3: How to add subdomain to a static website hosted on s3

I bought a domain (xyz.com) from some domain provider.
I pointed its nameserver to Cloudflare to host dns.
I created an S3 bucket with name (xyz.com) and hosted my static website on it.
I added a CNAME record on cloudflare to point to the static website url of bucket.
Everything is working fine till here. (xyz.com) opens the static website hosted on S3 bucket.
Now I want to create (api.xyz.com) for AWS API Gateway custom domain.
I want API Gateway to trigger Lambda so that it computes and return back the result.
For above I added another CNAME record in cloudflare so that AWS ACM is able to issue me a certificate for (api.xyz.com). After few minutes ACM was able to issue me a certificate.
Now I added the custom domain in API Gateway and selected the above ACM certificate.
When I make http GET call to my api chrome shows:
This site can’t be reached
api.xyz.com’s server IP address could not be found.
DNS_PROBE_FINISHED_NXDOMAIN
How to fix this?
I am a beginner and maybe I am using some terms wrong. Please Ignore
Create a CNAME record to your api gateway and make sure you hit it using https

Jenkins server run with reverse proxy with google auth

I have setup jenkins server on aws and provided access to only my org public IP.
I want to open it with my organization vpn for some people working from home so he want access the server.
Also jenkins have google auth.
how to setup for this problem

socket.io 400 bad request cloudfront

I am working on a web-app which uses socket.io for real time chat purpose.
web-app is developed in MEAN stack.
my front End build is hosted on S3 and powered by cloudfront.
and the back end is on EC2.
Now everything works fine,my APIs are redirected to the EC2 properly as cloudfront cannot handle them.
but I get 400 error for my socket.io
I have searched a lot but couldn't find a solution.
cloudfront has ssl certificate attached but my server still runs on 80.
I haven't used nginx or any server on my ec2 instance.
Also I don't have any ALB initialised.
I know cloudfront doesn't support websockets but what steps I have to take to make it work?

Restrict access meteor app access to specific IPs

we have an apache reverse proxy in front of our meteor app. there is no firewall between the proxy and meteor so users who can hit the proxy can also hit meteor. i want to restrict meteor app access to ONLY the reverse proxy. the meteor app and the apache proxy are hosted in OSE 3
i thought of 2 main possible solutions.
1) use OSE3/kerbenetes to restrict meteor access to ONLY the apache proxy
2) include a signed http request header value in proxy to meteor request so meteor can verify the request is from the proxy. - could not figure this one out
i prefer option 1 to option 2. how can i leverage services in OSE 3 to accomplish option 1? if option 1 is not possible how can i do option 2? if both are impossible, what alternatives do i have?
Routing in ose3 exposes a service to the outside world. So if we remove a route then the service is only available internally through its cluster ip. Thus remove any routes associated with the meteor app and only leave a apache proxy route exposed. Then in side the apache httpd.conf proxy using the meteor app's ip address.