Allows you to quickly deploy and manage applications in the AWS Cloud without worrying about the infrastructure that runs those applications.
Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring for your applications.
It is a Platform-as-a-Service
Elastic Beanstalk supports the following languages:
Elastic Beanstalk supports the following web containers:
Elastic Beanstalk supports Docker containers.
Elastic Beanstalk Workflow
Your application’s domain name is in the format:
There is a limit to the number of application versions you can have. You can avoid hitting the limit by applying an application version lifecycle policy to your applications to tell Elastic Beanstalk to delete application versions that are old or to delete application versions when the total number of versions for an application exceeds a specified number.
- You can add AWS Elastic Beanstalk configuration files (.ebextensions) to your web application’s source code to configure your environment and customize the AWS resources that it contains.
- Configuration files are YAML- or JSON-formatted documents with a .config file extension that you place in a folder named .ebextensions and deploy in your application source bundle.
- The package.json is a file that contains the libraries needed by the Node.js application to run.
- The .elasticbeanstalk folder is a folder that contains the environment configuration settings for the current running environment.
- Documents with a .config file extension should be placed in the .ebextensions folder.
References:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions.html
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/applications-sourcebundle.html
The connections between your application’s component environments can be specified as named references using environment links.
You can rebuild terminated environments within six weeks of their termination with the same name, ID, and configuration.
There is no additional charge for Elastic Beanstalk. You pay only for the underlying AWS resources that your application consumes.
An online shopping platform has been deployed to AWS using Elastic Beanstalk. They simply uploaded their Node.js application, and Elastic Beanstalk automatically handles the details of capacity provisioning, load balancing, scaling, and application health monitoring. Since the entire deployment process is automated, the DevOps team is not sure where to get the application log files of their shopping platform.
In Elastic Beanstalk, where does it store the application files and server log files?
AWS Elastic Beanstalk stores your application files and optionally, server log files in Amazon S3. If you are using the AWS Management Console, the AWS Toolkit for Visual Studio, or AWS Toolkit for Eclipse, an Amazon S3 bucket will be created in your account and the files you upload will be automatically copied from your local client to Amazon S3. Optionally, you may configure Elastic Beanstalk to copy your server log files every hour to Amazon S3. You do this by editing the environment configuration settings.
Thus, the correct answer is the option that says: Application files are stored in S3. The server log files can also optionally be stored in S3 or in CloudWatch Logs.
With CloudWatch Logs, you can monitor and archive your Elastic Beanstalk application, system, and custom log files from Amazon EC2 instances of your environments. You can also configure alarms that make it easier for you to react to specific log stream events that your metric filters extract. The CloudWatch Logs agent installed on each Amazon EC2 instance in your environment publishes metric data points to the CloudWatch service for each log group you configure. Each log group applies its own filter patterns to determine what log stream events to send to CloudWatch as data points. Log streams that belong to the same log group share the same retention, monitoring, and access control settings. You can configure Elastic Beanstalk to automatically stream logs to the CloudWatch service.
The option that says: Application files are stored in S3. The server log files can only be stored in the attached EBS volumes of the EC2 instances, which were launched by AWS Elastic Beanstalk is incorrect because the server log files can also be stored in either S3 or CloudWatch Logs, and not only on the EBS volumes of the EC2 instances which are launched by AWS Elastic Beanstalk.
The option that says: Application files are stored in S3. The server log files can be stored directly in Glacier or in CloudWatch Logs is incorrect because the server log files can optionally be stored in either S3 or CloudWatch Logs, but not directly to Glacier. You can create a lifecycle policy to the S3 bucket to store the server logs and archive it in Glacier, but there is no direct way of storing the server logs to Glacier using Elastic Beanstalk unless you do it programmatically.
The option that says: Application files are stored in S3. The server log files can be optionally stored in CloudTrail or in CloudWatch Logs is incorrect because the server log files can optionally be stored in either S3 or CloudWatch Logs, but not directly to CloudTrail as this service is primarily used for auditing API calls.
A former colleague reached out to you for consultation. He uploads a Django project in Elastic Beanstalk through CLI using instructions he read in a blog post, but for some reason, he could not create the environment he needs for his project. He encounters an error message saying “The instance profile aws-elasticbeanstalk-ec2-role associated with the environment does not exist.”
What are the possible causes of this issue? (Select TWO.)
AWS EB CLI cannot create the instance profile for your Beanstalk environment if your IAM role has no access to creating roles.
This error is also thrown when the instance profile has insufficient or outdated policies that Beanstalk needs to function. More details on this can be seen in the references provided.
The error message indicates that the instance profile associated with the environment does not exist, which means that the role used to launch the environment does not have permission to create roles.
Even if the role used to launch the environment has permission to create roles, the instance profile may have insufficient permissions that Elastic Beanstalk needs to launch the environment.
– Elastic Beanstalk CLI did not create one because your IAM role has no permission to create roles.
– IAM role already exists but has insufficient permissions that Elastic Beanstalk needs.
The option that says: He selected the wrong platform for the Django code is incorrect because this would give a different issue.
The option that says: Instance profile container for the role needs to be manually replaced every time a new environment is launched is incorrect because there is no need to manually replace instance profile containers.
The option that says: You have not associated an Elastic Beanstalk role to your CLI is incorrect because logging in to the CLI also assumes the role in your account.
For more AWS practice exam questions with detailed explanations, check this out:Tutorials Dojo AWS Practice Tests