change max_allowed_packet (or any arbitrary DB parameter group value) in Amazon RDS from commandline

This task sounds to be quite easy, but because the AWS Management Console does not allow the manipulation of parameter group values, you have to go the way using the API from your commandline (or from wherever you want). This post will explain how to do it in your console using the API tools from amazon.

  • Install sun-java6-bin (if you dont have java installed yet!)
  • Unpack them to /opt/rds-tools
  • Move the file “credential-file-path.template” to credentials.txt. Open the file and copy the two keys from your AWS management console (click on ‘Account’ and then ‘Security Credentials’!)
  • Edit the file ~/.bashrc by adding the following lines at the end:

and may be the java paths (obviously, you have to adjust the path to the correct version):

  • Now run whatever command you want: