Unable to copy a script >16kb with user_data (aws_launch_configuration)

getting the below error message:

Error: expected length of user_data to be in the range (1 - 16384), got #!/bin/bash

any suggestions would be helpful.

thanks in advance.

This limit is set by Amazon.

You must make your user data script smaller.