AWS Beanstalk Components
Let us now look at some key concepts of the elastic beanstalk environment.
In Amazon Elastic Beanstalk, you upload your application as a zip file with all the contents in it. An Elastic Beanstalk application is logically considered an equivalent to a file containing the source code. The file is the application in the Elastic Beanstalk environment.
Application Version refers to the web application which you have uploaded and will upload it’s next upgraded version. For example, you upload your application to AWS Beanstalk at first and then you have updated the source code of your application. Instead of overwriting your previous version of the application, you can give it a new version name which you could use to compare them both.
Collection of AWS resources is an environment and an environment can only run one application version at a time. You may run multiple applications in multiple environments at the same time.
Whenever an environment is created, Amazon Elastic Beanstalk automatically provisions required EC2 instances and S3 buckets.
You can also mention the tier of your environment. Basically there are two environment tiers available and they are Web Server Environment and Worker Environment.
An application using PHP or requires HTTP requests runs in an Web Server Environment.
An application using Amazon Simple Queue Service (SQS) runs in an Worker Environment.
The configuration of an environment is a set of parameters like security group, Instance type, and platform version. If you change the configuration, Amazon Elastic Beanstalk implements it dynamically. It either applies the new changes or deletes and deploy new resources.
You can create a template which contains the basic functionalities and use it as a starting point for your environment configurations. You can also modify the configurations whenever you need and use it while creating new environment.
A platform is a combination of all the AWS Beanstalk components, an Operating system, a programming language runtime, and a web server to run the applications. You can choose your platform while creating your application or environment. You don’t need to update it or include software patches, AWS takes care of that. Just try to make your application as good as possible.