Basic setup
- Install the AWS CLI
- Run
aws configure
. Configure the CLI with an account that has appropriate permissions to CloudWatch. - Install Snowsql.
- Edit the Snowsql config file
~/.snowsql/config
. You will need to set username, password, account and warehouse. - Test the Snowsql CLI by running
snowsql -f metric_sql_script
. - Edit the SQL in
metric-sql-script
to point to your warehouse. - Edit
monitoring-script
to point to themetric-name
andnamespace
of your choice. - To write current metrics, run
./monitoring-script
. - Consider moving Snowsql to key pair authentication for a production use case.