After the widgets for the Lambda metrics and API Gateway are configured, you can preview the dashboard, before saving it.
The following screenshot shows that the number metrics widget for Lambda and the API Gateway are configured in the preview. Clicking on Save Dashboard will create the dashboard, as follows: