AWS CloudWatch Flashcards Preview

Learn AWS > AWS CloudWatch > Flashcards

Flashcards in AWS CloudWatch Deck (79):

What is a AWS CloudWatch Metric?

Is a time-ordered set of data points


I have a custom application, can I publish a custom Metric to CloudWatch?

Yes, you can use the CLI or API.


How long is data available in a Matric?

15 months before it is overwritten


Can you send historical matric data to cloud watch?

Yes, you can send up to 2 weeks of historical data.


If you do not provide a time stamp for a matric data point what will happen?

Cloud watch will add a timestamp based on DateTime received.


What happens to data points less than 60 seconds?

They are available for 3hrs after this they are aggregated for long-term storage as a Statistic.


What happens to data points of equal to 60 seconds?

They are available for 15 days and then aggregated for long-term storage.


What is a CloudWatch dimension?

Is a key-value pair that identifies the matric, you can have up to 10 dimensions on a Metric.


How many dimensions can I have?

Up to 10.


What is a cloud watch namespace?

A namespace is a container for matric's.


Are cloudwatch namespaces isolated from each other?

Yes, AWS/EC2 is seperate from AWS/VPC


Can i have 11 dimentions for a matric?

No there is a limit of up to 10.


What is a namespace used for?

It holds one or more matric from a common source such as AWS/S3 or AWS/EC2.


What is a statistic?

Statistics are the metric data points aggrigations over a time period. This happens to data that is of high resolution, below 60 seconds after 3hrs data is aggregated into a statistic.





What will a stastic look like?

Minium, Maxum, Sum, Average, SampleCount


Has a stat a unit of measure and what is it used for?

A stat unit of measure temms the data wnat is is, for example seconds, bytes, count, present.


What is a CloudWatch metric statistic period?

It is the period of time the statistic represents.


Are cloud watch metric stat period defined in seconds?

Yes periods are defiend in seconds, 360 is six minutes.


Are aggrigated cloud watch metric stat be available when now using detailed monitoring?

No dfatiled stats are only available when using detailed monitoring.


Can a CloudWatch metric statistic aggregate across regions?

No, data for the statistic comes from the region the statistic is being produced in.


CloudWatch has a number of different functions, what are they?

Collect process, store and graphic metric from AWS systems. Also collect, process and store log files, dashboards, alarms and events.


Cathy recently joined Concerto, she been set up on the corporate AWS account with no access to any AWS resources, Cathy needs read-only access to CloudWacth, how can I do this?

Create an inline policy for Cathy with read-only privileges to CloudWatch or add Cathy to an existing IAM group with read-only privileges.


What will this IAM policy do with regard to AWSCloudWatch, { "Version": "2012-10-17", "Statement":[{ "Effect":"Allow", "Action":["cloudwatch:GetMetricStatistics","cloudwatch:ListMetrics"], "Resource":"*", "Condition":{ "Bool":{ "aws:SecureTransport":"true" } } } ] }

The policy is a resource-based policy and will allow (cloudwatch:GetMetricStatisticsdata and cloudwatch:ListMetrics) to be called only if SSL is true.


What are the supported notification services for AWSCloudWatch?



With regard to CloudWatch logs, what is cloud watch logs main purpose?

Enables you to store log information sent from EC2 agents or through the API


How can I count the number of log events arriving at cloudwatch logs?

You can use a cloudwatch metric filter and sets it a pattern and matric name, this will send metric to cloudwatch metric.


If I wanted to log information from the OS in an EC2 instance, is it possible and what do I need to do?

Yes, it is possible, you have to add an agent to the EC2 instance and set up a log group and log stream.


I just installed a CloudWatch log agent on an EC2 instance, configured to send data through VPC IG and internet to CloudWatch, I also set up a log group and log stream, I am not getting data logs to AWS CloudWatch logs, what could be causing this?

The security group rules or ACL could be blocking,


On my VPC I need to be alerted when a connection is attempted from an external IP coming in from the internet, how could I do this?

You could use VPC flow logs and send the flow log data to cloudwatch logs, create a metric filter to send output to cloudwatch metrics, also create a CloudWatch alarm.


I have a log file, is it possible to upload this file to a cloudwatch stream?

Yes, you can use the cloudwatch logs API to upload this file into the log stream. PutLogEvents


Using CLI, how can I get a list of the logs in a log group?

aws logs filter-log-events --log-group-name CloudTrail/DefaultLogGroup


I need to analyze flow logs in AWS Kinesis, how can I do this?

I can configure AWS VPC FlowLogs to be sent to a CloudWatch log stream in a log group, I can subscribe to this stream and have the data delivered to AWS aws kinesis to be analyzed. PutSubscriptionFilter


When I use PutSubscriptionFilter in relation to AWS CloudWatch logs, what am I doing?

You are subscribing to the log stream so you can receive the incoming events as the arrive into the log stream.


With regard to AWS log stream's, what are the subscriptions endpoints I can use with PutSubscriptionFilte?

An Amazon Kinesis stream belonging to the same account as the subscription filter, for same-account delivery. A logical destination that belongs to a different account, for cross-account delivery. An Amazon Kinesis Firehose delivery stream that belongs to the same account as the subscription filter, for same-account delivery. An AWS Lambda function that belongs to the same account as the subscription filter, for same-account delivery.


With regard to AWS cloudwatch logs, how long can I retain the data for?

For ever


What is the default length of time I can retain data in cloudwatch logs

The default length is for ever


I need to conserve on cost's in relation to my cloud, i see cloudwatch logs is using quite an amouint of dat and it is growing year on year, i do not nee do keep data over a year, what cna I do usiong AWS functionality?

You can set the retention policy. PutRetentionPolicy ebables you to set the number of days you data is retained and available.


What is a Matric filter in Cloudwatch logs?

A matric filter enables you to create a pattern that will be matched on incoming log events and will add to a custom Cloudwatch metric.


How can I count the number of 404 code coming to my EC2 instance using only AWS services or features?

Can you set up VPC from logs with data sent to cloudwatch log group, set up a metric filter to add to a custom cloudwatch metric. 


Where are flow logs sent to, a log group or a log stream?

Flow logs are sent to a log group?


Can I send flow logs to another destination?

Yes you can send to an S3 buckst


When sending logs to Cloudwatch log group, do you need IAM permissions?

Yes, you need an IAM role with permissions to publish to Cloudwatch or S3. This role will be assumed by VPC FlowLOgs service. 


On VPC flow logs can I filter on the recorded traffic?

Yes, you can choose to record all, accept or reject traffic.


Will the flow logs have traffic to Amazon DNS servers?



Will the low logs have Windows licence activation traffic present?



Will DHCP requests be present in the flow logs?



How often will flowlogs send data to a Cloudwatch log group?

About every 10min.


What information will flow logs have?

The ENI (Network interface), Accepted or Rejected,  src and dest address, src and dest port, protocol, num packets transferred during capture window, windows start time, windows end time, action, log-status (if all capturing was ok).


Can I Tag a log group?



Can I Tag a Cloud|Watch log stream?



What is a Cloudwatch metric namespace?

Namespace is a container for Metrics, for example, the AWS/EC2 namespace contains all the metrics for EC2 instances.


What types of metrics are available for S3?

Storage and request.


How often are s3 storage metrics reported?

Once per day.


What intervals are S3 storage matric reported on?

about every 1 min, but only once a day.



What is a Clouswatch metric statistic used for?

It is used as an ag

gregation for matric data. An example is data points less then 


For CloudWatch Metrics for S3, what is the metric for getting the size of the bucket?



For CloudWatch Metrics for S3, what is the metric for getting the number of objects?



With regard to CloudWatch Metrics and S3, is BucketSizeBytes and NumberOfObjects a BucketMetric or a Request metric?

A bucket Metric.


With regard to CloudWatch Metrics and S3 how can I get Metric values with regard to the S3 requests?

S3 has a list of Metrics available where you can get Metrics for AllRequets, GetRequetss, PutRequets, DeleteRequetss,


What CLI command would I used to get S3 Metric information?

aws cloudwatch get-metric-statistics


With regard to CloudWatch Metrics, what is a dimension and what is it used for?

A dimension is a set of key-value pairs on a Metric that are used to give the metric extra information that can be used to filter. An example is an S3 Metric has a dimension called StorageType that holds the storage type infolike GLACIER, STANDARD, you know from this that matric is of type X.



How can we search and filter the published Cloudwatch log and turn results into numerical Cloudwatch Metrics? 

Using Cloudwatch Metric filters, with these filters we can use a pattern syntax to find things like 400 responses and turn this into a Metric data point.


When we create a Cloudwatch filter what are the inputs?

filter pattern, name, namespace, metric value, default value.


How can I share my log data with another account?

Subscriptions: It is possible to share your log data with another account, the important thing here is data can only be shared with an account with Knesis, Kenisi is the only supported endpoint Cloudwatch supports.


I want to share my log data with a Kenisis log aggregator in another account, what do I need to do?

  1.  aws kinesis create-stream
  2. aws logs put-subscription-filter 3.


What is cCloudWatch Log Subscription Filter used for? 

It establishes a subscription on a log group and filters using a filter-pattern the traffic and delivers this traffic to another account-kinesis ARN destination.


I need to share my logs with another account with a lambda expression, can I use CloudWatch Logs subscriptions?

No, currently the only supported delivery resource in another account is Kenesis


Is it possible to share my CloudWatch logs with Lambda?

Yes, I can share my logs with Lambda using a SunscriptionFilter, this will start to deliver my logs to the Lambda resource as a stream.


What is a ClouWatch Logs Subscription filter?

This is a filter that when created enables you to subscribe to a CloudWatch logs log group and have the data streamed to an endpoint, supported endpoints are,

  1. Lambda in the same account
  2. Kinesis in the same account
  3. Kinesis in a separate account
  4. ElasticSerch (ES) in same account



In a CloudWatch logs subscription, what is the filter pattern used for?


This is used to filter only the logs info you want and this log data will be streamed to the destination.


What be AWS service logs published directly S3?

VPC Flow Logs.


I need to get a quick dump of a current AWS CloudWatch log group, how can I do this?

You can use the AWS CloudWatch create-export-task in the CLI to export the data to an S3  bucket.


I need to secure the data in the AWS CloudWatch log group, how can I do this?

You can use AWS logs associate-kms-key with the AWS CloudWatch logs log group, dat from the point on will be encrypted.


Can I tag an AWS CloudWatch log stream?



How can I measure the number of events into CloudWatch logs?

CloudWatch logs send metrics to CloudWatch, like, 

  • IncomingLogsEvents, 
  • ForwaredBytes
  • IncomingBytes




How can dimensions can I have on a CloudWatch metric?