By the help of lambda, you can ignore where your code is running. You just deploy a package that AWS lambda will execute somewhere. You pay by execution time.
Elastic Beanstalk provides a more typical execution environment: you code your application as usual and AWS will take care of provisioning your web server and all the necessary things including scaling.