Find answers, ask questions, and connect with our
community around the world.

Home Forums AWS AWS Certified Solutions Architect Professional EventBridge does not listen to CloudWatch metrics Reply To: EventBridge does not listen to CloudWatch metrics

  • Tutorials-Dojo

    Administrator
    January 5, 2024 at 9:22 pm

    Hi Fernando-6,

    Thank you for posting your question. To provide more context to our readers, let’s see the scenario once again:


    A company uses Amazon WorkSpaces to improve the productivity and security of its remote workers. Hundreds of remote workers log in to the virtual desktop service using the Amazon WorkSpaces client application on a regular basis. Users have reported that they cannot log in to their virtual desktops even though they have the correct credentials.

    Upon investigation, the Solutions Architect discovered that the filesystem storing the user profiles has reached its capacity, which is the reason why users cannot establish a new session in Amazon WorkSpaces. The environment is configured with a 10 TB Amazon FSx for Windows File Server file system to store the user profiles.

    Which of the following options should the Solutions Architect implement to solve the issue and prevent it from happening again?

    The correct answer says:

    Create an Amazon CloudWatch metric to monitor the FreeStorageCapacity of the file system. Write an AWS Lambda Function to increase the capacity of the Amazon FSx for Windows File Server file system using the update-file-system command. Utilize Amazon EventBridge to invoke this Lambda function when the metric threshold is reached.


    Take note that the above-mentioned “metric threshold” is directly related to CloudWatch Alarms. A CloudWatch metric is different from a mere “metric” (numerical data) since it is an entity containing a custom metric, alarm, and other components.

    When you create a CloudWatch Alarm, you create a user-defined metric in the “Metric Name” field as shown in the screenshots below:

    https://media.tutorialsdojo.com/test_for_fernando_1.png

    You will see the “metric” you created in the CloudWatch Alarms console as seen here:

    https://media.tutorialsdojo.com/test_for_fernando_2.png

    The official AWS documentation says:

    Increase your file system’s storage capacity when it’s running low on free storage capacity. Use the FreeStorageCapacity CloudWatch metric to monitor the amount of free storage available on the file system. You can create an Amazon CloudWatch alarm on this metric and get notified when it drops below a specific threshold.

    Reference:

    https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-storage-capacity.html

    Another documentation says:

    You can use the following solution to dynamically increase the storage capacity of an FSx for Windows File Server file system when the amount of free storage capacity falls below a defined threshold that you specify. This AWS CloudFormation template automatically deploys all of the components that are required to define the free storage capacity threshold, the Amazon CloudWatch alarm based on this threshold, and the AWS Lambda function that increases the file system’s storage capacity.

    Reference

    https://docs.aws.amazon.com/fsx/latest/WindowsGuide/managing-storage-capacity.html#automate-storage-capacity-increase

    Apparently, the correct answer is fully supported by the official documentation because:

    – It uses the “FreeStorageCapacity” CloudWatch metric to monitor the amount of free storage available on the file system.

    – Utilizes Amazon EventBridge to invoke the Lambda function when the metric threshold is breached, in which a “metric threshold” only exists for Amazon CloudWatch Alarms.

    We acknowledge that we can further improve the correct answer by:

    – Explicitly mentioned “CloudWatch Alarms” in the option

    – Rephrase “Create an Amazon CloudWatch metric to monitor the FreeStorageCapacity” to avoid the ambiguity of creating a CloudWatch metric.

    We have made the above changes, and will be reflected in our question bank soon.

    Let us know if you need further assistance. The Tutorials Dojo team is dedicated to help you pass your AWS exam on your first try!

    Regards,

    Jon Bonso @ Tutorials Dojo