PaaS, or Platform-as-a-Service, is an apprach to cloud deployment that provides customers a complete cloud platform — hardware, software, and infrastructure for developing, running, and managing applications.
In PaaS approach developer creates application, that must match requirements and capabilities of chosen platform. It might be specific runtime type and version or API that can be used or configuration settings.Amazon Web Services provides Elastic Beanstalk service, that allows building and deploying applications in PaaS model.
On first sight Elastic Beanstalk simplify a lot. When we launch creator first time, we need to select fauvorite runtime) and wait few minutes for initialization of environment. We can immediately go to application, because by default Elastic Beanstalk will upload sample application. We didn't need to think about provisioning EC2 instance, configure security groups, permissions, etc. If initial configuration is good enough, we can start developing our application. It will work until we find, that default settings no longer fit our requirements.
Elastic Beanstalk provides reasonable default settings for basic web application, but at
the same time gives developers a lot of flexibility. If you go deeper, you eventually will
find out, that Elastic Beanstalk is an EC2 instance, which runs with dedicated AMI image.
Bunch of Python scripts is responsible for fetching deployment package from S3 bucket,
copy content to right place, start service and reverse proxy. Except configuration, that
can be changed in AWS Management Console or with AWS CLI, developer can adjust setting of
opearting system, install non-default Fedora packages.Either directly on EC2 instance or
configuration files -
so called .ebextensions. However adjusting OS settings is a last resort. Configuration,
that can be modified in AWS Console should cover 80% of use cases.
Running application on Elastic Beanstalk will cost. In most basic setup you will need to pay for EC2 instance, network traffic and S3 buckets.If you enable autoscaling, add to this equation an Application Load Balancer and all EC2 that AWS will provision on your behalf.
You may ask if I should use Elastic Beanstalk or novel AWS AppRunner? I'd recommend chosing Elastic Beanstalk if you like building applications without worry about patching operating system, updating runtime, configure users, etc. And at the same time you want to have enough flexiblity to adjust environment's parameters.