I cannot access my AWS EC2 server via IP - amazon-web-services

I'm first time to use AWS, I follow the guideline to create the EC2 server.
and setup the FTP connection, which it is something call SSH, I don't know the server stuff, but I can connect it via my FileZilla and upload folder.
But I don't know what is the address to visit my website, and I added the rule already as below,

Your EC2 might not be in a public VPC.
Just assigning public DNS would not help if your EC2 is in a private VPC
Check the parent VPC details

Related

AWS Lambda sftp to another account's private vpc

I have a task which requires me to pull files from a private sftp server outside my network using AWS Lambda. I am using the paramiko library and I was wondering if this is possible as the the ip provided are private i.e. 10.xxx.xxx.xxx. This private server belongs to another organization and they do not have a public ip for me to ssh into before ssh-ing into their private vpc.
I have vpc peering set up and I am able to ssh to the server via ec2 instance connect but cant seem to do so on lambda. Please advise thank you!
You can configure your lambda to run inside your VPC.
Check this out here:
https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html

Creating a new VPC and EC2 instance

I deleted my default VPC to start from scratch with a private network CIDR (10.10.10.0/24). After that I checked all ACL's and security-group settings to be open to the world. I also attached a new internet gateway to my VPC and my EC2 instance is also showing a public IP after launch.
The problem now is that I'm not able to access the public EC2 instance IP using SSH. I have no idea how to further process here, I checked the AWS documentations but with no success as everything seems to be in place as it has to be.
Can smb. please explain to me how to build a VPC from scratch. So that if I launch an EC2 instance within the VPC I can access the public IP of the ec2 instance using SSH
Thanks in advance
Based on the comments.
The issue was caused due to lack of correct route to internet gateway. The correct route should directed all connections to 0.0.0.0/0 into the gateway.
The solution was to provide correct route to the gateway.

Is there a managed way to do P2S VPN in AWS?

I want to connect my (OSX) laptop to a VPC in AWS but I couldn't find a way to do this since I don't have a static IP.
Azure has managed P2S VPN: https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-about. Is there something like this in AWS?
You can stand up a virtual device (such as a CheckPoint firewall) in the VPC on an EC2 instance that has point to site VPN functionality. There are a number of AMI’s and quick starts for this available. You would also need a VPN client running on your laptop.
As an alternative, you can set up a bastion server and whitelist your IP. You can create a shell script that gets your IP and makes an AWS CLI call to update the security group with that value if it doesn’t exist. Then, log into the bastion and you’re in the VPC.
You can setup a client VPN under the VPC menu:
https://docs.aws.amazon.com/vpn/latest/clientvpn-admin/cvpn-working-endpoints.html
It will require to have server cert, as well as client certificates or a link to managed AD for authentication.

AWS EC2 Instance without private ip (windows)

I am starting new instances via a launch configuration where userdata is specified. This data only needs to download a configuration file from S3. The instance is launched with an IAM role that has full S3 rights.
I can confirm that the script does work, if I create the instances with public ip's everything is gravy. However if there is no public ip, it just hangs. I can use a jump box and remote into the box, the user script is there, if I run it, it just hangs.
I have no need for these machines (web servers) to have public ip's as they are behind an ELB and Route 53.
If your instances have no public-IP and no route to the public Internet you could consider using a VPC endpoint to reach S3:
https://aws.amazon.com/blogs/aws/new-vpc-endpoint-for-amazon-s3/

Access a second EC2 instance in AWS VPC

I've been looking around, but haven't been able to find much. It all seems to assume that I'm trying to access a single EC2 instance under a VPC.
The scenario: We have one EC2 medium under a VPC which is hosting several websites (running Windows), and we need to launch a Linux EC2 under that same VPC to run a forum for one of the sites. It's going to run at domain.com/forum where domain.com is hosted on the Windows server. I'm going to try using a reverse proxy in IIS to get the forum, but we need to access it first. Would a NAT instance be what I'm looking for?
Any ideas?
You don't need a NAT. You would need a NAT only if you had only one server in the public subnet, and the other servers behind the private subnet. As you have already one server serving websites, I can assume you have a VPC with either public subnet or public subnet + private subnet.
For more info, see http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html
Anyway, just launch your linux instance and make sure to configure your HTTPD (Apache VirtualHost or Nginx location) to respond to requests addressed to your domain subfolder correctly.
Start your linux instance in the same subnet as the windows instance. These two instances will be able to communicate using their local ips. The linux instance will get an IP and default gateway the same way your windows instance does(I'm assuming you are using an Internet Gateway in the VPC). A reverse proxy can be set up in IIS and configured to use the private address of the linux instance.