Skip to content
Sample project to demonstrate usage of the AWS SDK for .NET and the Toolkit for Visual Studio
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
AWS.AutoScale.Console
images
‌Binaries
AWS.AutoScale.Console.sln
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE.txt
NOTICE.txt
README.md

README.md

AWS Auto Scaling Console Sample C# Project

This C# project is a sample Auto Scaling Console application utilizing the Windows Presentation Foundation (WPF) to provide a Graphical User Interface for managing the AWS Auto Scaling feature. This sample utilizes the EC2, Auto Scaling, Elastic Load Balancing and SNS .NET APIs provided in the AWS SDK for .NET

About this sample

Being elastic is a fundamental principle of AWS. The key is to provision just the right amount of compute and storage resources to serve your workload. Compute nodes are the most common resource to scale, to ensure the right number of instances are running to meet the current application demand. Auto Scaling is well suited for applications that experience hourly, daily, or weekly variability in usage and need to automatically scale horizontally to keep up with usage variability. Auto Scaling frees you from having to accurately predict huge traffic spikes and plan for provisioning resources in advance of them. With Auto Scaling you can build a fully scalable and affordable infrastructure on the cloud.

As an example, mywebsite.com is running multiple copies of its web application hosted on identical Amazon EC2 instances, each handling customer requests. These EC2 instances are categorized into an Auto Scaling group and fronted by an Elastic Load Balancer that facilitates load balancing resources across Availability Zones.

start

As time moves along, the application load increases and the web server fleet needs to horizontally scale for additional capacity. This can be triggered in a number of ways, such as, by using a schedule you define because you know when the peak is coming or a more likely scenario is the EC2 instance will generate an aggregate metric across the auto scaling fleet that is used to trigger the scale out....let’s say CPU load. So when the fleet average exceeds 80% the group will scale out.

scale out

Then when CPU average across the fleet reaches less than 30%, the auto scaling group will scale down and the additional instances are removed.

scale down

This helps mywebsite.com make efficient use of its compute resources by automatically scaling in and out based on key metrics for its web server fleet.

The auto scaling console sample allows you to setup and manage your own Launch Configurations and Auto Scaling Groups through a Graphical User Interface.

Requirements

In order to use the auto scaling console sample application, you will need an AWS account. To sign up for AWS, go to http://aws.amazon.com.

Additionally, you will need to install the AWS SDK for .NET which provides .NET APIs for many AWS services including those used in this sample application.

Basic Configuration

You need to set your AWS security credentials before the sample is able to connect to AWS. The sample will automatically pick up the credentials provided in the appSettings section of the application configuration file (App.config):

<appSettings>
  <add key="AWSAccessKey" value="YOUR ACCESS KEY ID" />
  <add key="AWSSecretKey" value="YOUR SECRET KEY" />
</appSettings>

See the Your Security Credentials page for more information on getting your keys. For more information on configuring credentials for applications, see the AWS SDK for .NET Developer Guide.

Running the Sample

To run the application, just compile and launch the Auto Scaling Console executable.

  • Open the AWS.AutoScale.Demo.sln file with Visual Studio or your desired .NET IDE
  • Open the App.config from the Visual Studio Solution Explorer or your desired .NET IDE
  • Enter in your AWS Access Key and AWS Secret Key in the value attribute of the AWSAccessKey and AWSSecretKey application settings
  • Compile and launch the executable

Resources

License

This sample application is distributed under the MIT-0 License. See the LICENSE file.

You can’t perform that action at this time.