Devopsirs, I need help

Devopsirs, I need help.

Deployed my API to AWS. It works perfectly fine via postman but how do I access it via web? Do I need route 53?

Also I'm pretty paranoid about getting charged in USD. Already used S3 (to upload jar then push to EC2), EC2 linux and RDS t2.micro as the DB.

My aws free tier account expires at 10/11. Can I keep this API running until then?

Attached: 1.png (147x150, 3.91K)

Other urls found in this thread:

ec2.amazonaws.com:8080/api/users/
twitter.com/NSFWRedditVideo

install gentoo

you mean you need a domain name for your app?

Not necessarily, I just want to be able to access my API directly from browser instead of postman.

For access:
I can't remember ec2 exactly but you should have a 'public ip' associated with your instance. You might need to set the security groups to allow access from anywhere from the port you are trying to hit though.

For charges:
I would kill the instance as soon as you are done with it but you are going to get charged inevitably as well, just through mistakes/forgetting to down an instance/free tier expires and you don't remember at the time etc. Put some alerts on the account to email if the amount spent is beyond a few pennies.

Yeah, I have the public ip and the security group set to inboud from any point but can acess via browser. Weird because postman access all crud normally.

Just do it serverless. For low traffic it's basically free and easier to setup

might be trying to force https or something? I've had that happen sometimes. When you open up the console what is the get url?

I need exactly the server because it is an API for my portfolio. The point of the website is to show I can do some rest API.

* Preparing request to ec2.amazonaws.com:8080/api/users/
* Using default HTTP version
* Enable automatic URL encoding
* Enable SSL validation
* Enable cookie sending with jar of 1 cookie
* Found bundle for host ec2-amazonaws.com: 0x13e20039e10 [serially]
* Can not multiplex, even if we wanted to!
* Re-using existing connection! (#1) with host ec2.amazonaws.com
* Connected to ec2.amazonaws.com (IP) port 8080 (#1)

> GET /api/users/ HTTP/1.1
> Host: ec2.amazonaws.com:8080
> Accept: */*
* Mark bundle as not supporting multiuse

< HTTP/1.1 200
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
< Expires: 0
< X-Frame-Options: DENY
< Content-Type: application/json
< Transfer-Encoding: chunked


* Received 187 B chunk
* Received 5 B chunk
* Connection #1 to host ec2.amazonaws.com left intact

here

FUCK AMAZON.

Thank you, found the solution. This trash must use http instead of https. Like anything in aws is a matter of correcting semantics and chars out of place.

BTW fuck aws.

welcome to modern development

>try to connect to aws rds
>it has 10 different labels and names for a single db
>spend hours trying to figure out how to write the prioper connection string
>pajeet from youtube does dns:port/dbname
>doesnt work
>keep trying
>for some reason what works is dns:port/postgres
>db is nome called postgres

>try to simply download a file from s3 bucket to ec2
>spend hours playing with the many options of security groups
>nothing works
>find tutorial from 2015 doing some hacking
>finally works

It just works.

Oh no, aws won again.

I have the working link to my API from EC2 (must use http instead of https). But how do I keep the spring running on EC2 after I close the SSH connection via putty?

Is there a way to open EC2, start spring and let it running forever? Do I need to keep my pc on 24/7 to have putty on and the server running?

Attached: 67.png (412x316, 213.52K)

it's been some years
you have to setup an API gateway and a network, a subnet with a load balancer or something like that. it's described in the docs, don't ask here asshole, use aws-cli

Is it working with the public ec2 DNS.

http:ec2-some-ip-here.amazonaws:8080/api/user

Now my next problem is keeping the server running when I close putty.

that's not how you do it because the IP changes whenever you restart the instance. you have to connect your instance to a network or api gateway might be enough, can't remember in detail.

use lambda or ec2 has hidden charges

I'm doing this API to try to get a job. The last thing I need now is some sneaky charge in dolars. Luckly I'm not gonna pay that credit card anyway.

dude... make it a systemd service. Or, for a quick fix, use tmux. Nevermind, I didn't say that, make it a service. Look up how to make a systemd service. Don't use tmux as a dirty workaround. AAAAAAH