It's a monitoring service to monitor the resources and what you run on AWS.
Host Level metrics
RAM utilisation is a custom metric. You need to write Perl script for this.
By default, monitoring is 5 minutes. Detailed monitoring is 1 minute.
How long are metrics stored?
By default, for 2 weeks. You can use the
GetMetricsStatistics API or third party tools to have access to data for longer.
You can retrieve data on terminated ELBs or instances for up to 2 weeks after it's termination.
Many default metrics are 1 minute, but it can be 3 or 5 too. The minimum that you can have it 1 minute.
You can use this to monitor any metric. You can even use it for something like bills etc too.
You can also set the appropriate action and thresholds.
On the console, you can see the status check from the EC2 panel.
There is a
System Status Check or
Instance Status Check.
What is the difference?
Difference troubleshooting for the different status checks.
System status checks
It will come up as an error if you have:
Instance status checks
rebooting the instanceor by making modifications in your operating system
All these groups of related resources are known as a stack.
A stack could be like a Route53 pointing to a load balancer that points to EC2 instances which all point to a DB server.
An app management service that helps you automate operational tasks using Chef. It gives you the flexibility to define the application architecture.
Chef turns infrastructure into code. You can automate how you build, deploy and manage your infrastructure. Chef server stores all the recipes and the nodes will periodically polls Chef server to bring everything up to date.
OpsWorks is a GUI to deploy and configure your infrastructure quickly. It consists of Stacks and Layers.
A stack is a container (or group) of resources. A layer exists within a stack. When you create a layer, you use OpsWorks to configure that layer for you.
From the AWS dashboard, we're going to create a stack and bring up a webpage without having to SSH.
Jump onto OpsWorks and add a stack. We can choose things like whether or not we want SSH access etc.
After creating a stack, we will be brought back to the main screen. Now, let's create some layers!
We can choose our types! We'll select PHP App Server for now. From here, you can add an instance.
When adding, you can use existing OpsWorks to see how everything looks and use existing EC2 instances etc.
Then you can select to start the instance and go from there.
In the apps section, set up a new app! You need to select the application source (eg git etc) and go from there.
Once the app is live, we will push the app out to the instance.
We can then click deploy and let the app deploy.
Once it has been deployed, you can then see the app running in the browser.
To teardown the stack, you need to stop the instance and apps first and then remove things like the layers from there.
Also note, you also need to delete all of the security groups after and do it all manually (in the update, you can now do it by selecting the entire security group.)