
Does EC2 instance have a public IP Association?
Checks whether Amazon Elastic Compute Cloud (Amazon EC2) instances have a public IP association. The rule is NON_COMPLIANT if the publicIp field is present in the Amazon EC2 instance configuration item. This rule applies only to IPv4. ec2-instance-no-public-ip - AWS Config
Why doesn't my EC2 instance sit in the public subnet?
It's copy, not inherit, which is why the behavior seems confusing. Though your instance sits in public subnet, you have to make sure that 'Auto-assign Public IP' is either set to 'Enable' or 'Use subnet setting (Enable)'on Configure Instance Details page. Sometimes folks forget to check/reverify this setting while creating EC2 instances.
What is ec2-instance-no-public-IP?
ec2-instance-no-public-ip Checks whether Amazon Elastic Compute Cloud (Amazon EC2) instances have a public IP association. The rule is NON_COMPLIANT if the publicIp field is present in the Amazon EC2 instance configuration item. This rule applies only to IPv4.
How do I assign an elastic IP address to an EC2 instance?
To allocate and associate an Elastic IP address with your EC2 Windows or Linux instance, follow these steps: Allocate an Elastic IP address from either Amazon’s pool of public IPv4 addresses or a custom IP address pool that you bring to your AWS account. Associate the Elastic IP address with a running instance.
See more

How to test EC2 web server?
If you ssh into the EC2 instance, then you can test the web server by using curl localhost. This will access the web server on the local machine. If that is working, then the problem is probably with your Security Group. If it is not working, then the problem is with your web server.
What is the first step in AWS security?
Check 1:- the First step would check your AWS security group and make sure all the inbound traffic rules are fine.
Is IGW assigned to subnet?
Already the IGW is assigned to subnet which be long to the ec2 instance but also not working
Private IPv4 addresses and internal DNS hostnames
A private IPv4 address is an IP address that's not reachable over the Internet. You can use private IPv4 addresses for communication between instances in the same VPC. For more information about the standards and specifications of private IPv4 addresses, see RFC 1918. We allocate private IPv4 addresses to instances using DHCP.
Public IPv4 addresses and external DNS hostnames
A public IP address is an IPv4 address that's reachable from the Internet. You can use public addresses for communication between your instances and the Internet.
Elastic IP addresses (IPv4)
An Elastic IP address is a public IPv4 address that you can allocate to your account. You can associate it to and disassociate it from instances as you require. It's allocated to your account until you choose to release it. For more information about Elastic IP addresses and how to use them, see Elastic IP addresses .
Amazon DNS server
Amazon provides a DNS server that resolves Amazon-provided IPv4 DNS hostnames to IPv4 addresses. The Amazon DNS server is located at the base of your VPC network range plus two. For more information, see Amazon DNS server in the Amazon VPC User Guide .
IPv6 addresses
You can optionally associate an IPv6 CIDR block with your VPC, and associate IPv6 CIDR blocks with your subnets. The IPv6 CIDR block for your VPC is automatically assigned from Amazon's pool of IPv6 addresses; you cannot choose the range yourself. For more information, see the following topics in the Amazon VPC User Guide :
Work with the IPv4 addresses for your instances
You can assign a public IPv4 address to your instance when you launch it. You can view the IPv4 addresses for your in the console through either the Instances page or the Network Interfaces page.
Work with the IPv6 addresses for your instances
You can view the IPv6 addresses assigned to your instance, assign a public IPv6 address to your instance, or unassign an IPv6 address from your instance. You can view these addresses in the console through either the Instances page or the Network Interfaces page.
Verify that the instance has a public IP address
If the instance doesn't have a public IP address, then the instance isn't accessible outside of the virtual private cloud (VPC) that it resides in. This is true even if the instance has an internet gateway.
Verify that a firewall isn't blocking access
If the instance meets the preceding conditions and internet connectivity issues persist, then try the following:
Short description
An Elastic IP address is a static public IPv4 address associated with your AWS account in a specific Region. Unlike an auto-assigned public IP address, an Elastic IP address is preserved after you stop and start your instance in a virtual private cloud (VPC).
Resolution
To allocate and associate an Elastic IP address with your EC2 Windows or Linux instance, follow these steps:

Private IPv4 Addresses
Public IPv4 Addresses
- A public IP address is an IPv4 address that's reachable from the Internet. You can use public addresses for communication between your instances and the Internet. When you launch an instance in a default VPC, we assign it a public IP address by default. When you launch an instance into a nondefault VPC, the subnet has an attribute that determines w...
Elastic IP Addresses
- An Elastic IP address is a public IPv4 address that you can allocate to your account. You can associate it to and disassociate it from instances as you require. It's allocated to your account until you choose to release it. For more information about Elastic IP addresses and how to use them, see Elastic IP addresses. We do not support Elastic IP addresses for IPv6.
IPv6 Addresses
- You can optionally associate an IPv6 CIDR block with your VPC and associate IPv6 CIDR blocks with your subnets. The IPv6 CIDR block for your VPC is automatically assigned from Amazon's pool of IPv6 addresses; you cannot choose the range yourself. For more information, see the following topics in the Amazon VPC User Guide: IPv6 addresses are globally unique and can be …
Work with The IPv4 Addresses For Your Instances
- You can assign a public IPv4 address to your instance when you launch it. You can view the IPv4 addresses for your instance in the console through either the Instances page or the Network Interfacespage.
Work with The IPv6 Addresses For Your Instances
- You can view the IPv6 addresses assigned to your instance, assign a public IPv6 address to your instance, or unassign an IPv6 address from your instance. You can view these addresses in the console through either the Instances page or the Network Interfacespage.
EC2 Instance hostnames
- When you create an EC2 instance, AWS creates a hostname for that instance. For more information on the types of hostnames and how they're provisioned by AWS, see Amazon EC2 instance hostname types. Amazon provides a DNS server that resolves Amazon-provided hostnames to IPv4 and IPv6 addresses. The Amazon DNS server is located at the base of your V…