Did you create an Internet Gateway and assign it to the VPC?
Does your route table have a 0.0.0.0/0 entry pointing to the IGW?
If you're trying to ping it from a client on the internet, make sure you have given your instance a public IP address and that's what you're pinging. Also open up your SG for ICMP inbound from your client's IP or whole internet. On the other hand if you're trying to ping its private IP address from an on-prem client connected via site-to-site VPN or Direct Connect, make sure your VPC's routing and NACLs are correct as well as your SG.
I took the default settings for networking when creating my instance, so it has public v4 and v6 addresses that are granted by EC2. The v4 address changes after a restart, but the v6 has remained the same. The SGs grant the same access as the old EC2 instance I have, which I am able to access without any problems. Using dig, it appears that DNS knows of the existence of the v4 address. I'm just trying to connect with ssh from my ISP, not using VPN or anything like that.
Relevant questions
Migrating RDS not in VPC (EC2 classic platform) to VPC
asked 5 days agoRecreate a default VPC within my Classic Platform
Accepted Answerasked a month agoErrors migrating EC2 classic instances to VPC
asked 21 days agoConnect Amazon DocumentDB Cluster from Outside Amazon VPC
asked 6 months agoError on Dashboard "An error occurred" and unable to create instance due to "Error loading AMI data".
asked 2 months agoNo Internet access from instance in VPC to Internet
asked 2 years agoUnable to create instance from newly created AMI
asked 3 years agoRunning AWS elasticbeanstalk single instance mode in a private VPC
asked 2 months agoHow do I configure an Amazon MQ instance that's in a VPC to invoke a Lambda function?
Accepted Answerasked 2 years agoproblems migrating EC2-Classic to Amazon VPC
Accepted Answerasked 9 days ago
I checked and for some reason, no Internet Gateway was created when I initially set up the VPC. (I took the default settings.) I created one, assigned it to the VPC, and created default v4 and v6 route table entries. I can now ssh to the new instance using v4 but not v6. I can use curl to get to www.ripe.net from the new instance using v4 and v6.