I can't add ssl to aws ec2 for my doman in namecheap

These are two different errors. NXDOMAIN means you forgot to add dns records for your www. subdomain (you should add A and/or AAAA, same as @).

404 on the http-01 challenge means your webserver has some configuration issues or you told certbot the wrong webroot directory.