You can use the CloudFormation template in the last section as a basis for automatically creating your own dashboards. Here are some improvements you can try:
If you are unsure of how to write the JSON document that describes the dashboard, you can build a dashboard manually and then go to
Actions -> View/edit source. That will show you the JSON representation of a dashboard.