Assuming this is in one of the playgrounds, it’s not working because it is not a supported service yet in playground.
When you start the playground, and before you log into the AWS console, it tells you which services are currently supported:
Note: Make sure to select the region as us-east-1 while creating resources.
Currently, we support EC2, S3, VPC, DynamoDB, Lambda, SNS and KMS. We are adding support for more services soon.
For a complete list of supported services and restrictions, please refer: Cloud Playground Support
Whilst Elastic Beanstalk is a service for launching EC2, it is not part of the EC2 service as defined by AWS, it is separate.