Thank you very much for the previous answer. It helped me a lot.
I checked that it is enough to set two permissions:
AdministratorAccess-AWSElasticBeanstalk
AWSCloudFormationFullAccess