5. Testing the solution

Due to various constraints in the workshop environment, the EBS Limits Forecast solution was deployed in dry-run mode, meaning that much of its automation has been completed ahead of the lab. However, you can see how each of the individual automation steps work by going through their details below.

Trigger WeeklyForecastHandlerLambda

Upload historical data to S3

The EBS Limits Forecast workflow starts with the DailyEbsVolumeCountLambda being triggered by the Cloudwatch daily event that we configured earlier in this lab. You can mimic this event in the lab by uploading 10 days’ worth of historical data to the input S3 Bucket. The historical data is in a file called historical_data.csv. The upload of this file will initiate a PUT event to the input S3 bucket which will in turn trigger the WeeklyForecastHandlerLambda.

  1. Download the historical_data.csv file that was created for this lab
  2. Click on the Services dropdown at the very top of the AWS Management console
  3. Find the S3 service and go to its page
  4. Click on your Input S3 Bucket (the bucket name is different in every account)
  5. Click Upload, and add the file, historical_data.csv

Observe Forecast processing in AWS Step Functions

Now that WeeklyForecastHandlerLambda has been triggered by the S3 PUT event, we can monitor the function’s progress as it automates each stage of Forecast.

  1. Click on the Services dropdown at the very top of the AWS Management console
  2. Find the Step Functions service and go to its page
  3. In the list of Step Functions click on EbsLimitsForecastStateMachine
  4. After a couple of minutes you should see one execution in Running status under the Executions section. Click on it

On the next page, you should see a realtime visual workflow of the Forecast automation being performed by WeeklyForecastHandlerLambda.

If you are interested in the custom Step Functions definition used by this state machine, you can take these additional steps:

  1. Towards the top of the same page, click on Edit state machine
  2. Under the Definition section you should see a definition in json. This instructs Step Function on how it should interact with the WeeklyForecastHandlerLambda while it automates Forecast.

Trigger EbsLimitIncreaseRequestorLambda

Upload Dummy Forecast export file to S3

Since the WeeklyForecastHandlerLambda can take a long time to complete, you can skip ahead to see what the final result of a typical Forecast workflow looks by uploading the dummy_forecast_export.csv file to the output S3 bucket. This upload is the equivalent of Amazon Forecast itself exporting a real data digest for further processing by EbsLimitIncreaseRequestorLambda.

  1. Download the dummy_forecast_export.csv file that was created for this lab.
  2. Click on the Services dropdown at the very top of the AWS Management console
  3. Find the S3 service and go to its page
  4. Click on your output S3 bucket (again, this name differs for every account)
  5. Click on the Upload button, and upload the dummy_forecast_export.csv file

At this point, the upload to S3 should invoke the EbsLimitIncreaseRequestorLambda since we created an S3 PUT event trigger for our output bucket earlier in this lab. The lambda function will parse the uploaded file and compare its data against the existing EBS limits and the EBS limit increase requests that are currently pending with AWS support.

Check for weekly report in email inbox

A few minutes after uploading dummy_forecast_export.csv you should receive an email report, summarizing your projected EBS count over the next 10 days, current account limits and active limit increase requests.