Bash script to send certain data from AWC EC2 to CloudWatch
Good


good variable names
nice indentation
good use of $()
double quoting $ variable interpolation


Challenges

I'm guessing some part of what you removed and xxxd has caused the putdata function to not do anything with the argument you are passing in.  If I guessed wrong, then you should remove the arguments so it doesn't cause someone else confusion.

Do you want this to be totally silent?    I'm not sure if the aws command produces any output here.  Adding a date command in the while loop would help debugging if you come back to the terminal later to figure out what happened.  I'd run this in a terminal under tmux for a few weeks before I started trying it in containers.  This sort of thing can have fun edge cases when some API falls over.  It can take a while to catch all of those.

It sounds like you'd like some logging.  That can be done in bash with redirection such as &gt;&gt; logfile.  Of course, there are more advanced choices.

I'd put a blank link before the while loop and get rid of the blank line inside of it.

You mention rewriting in python.  I wouldn't worry about it for anything this small.  But generally for AWS programming python is the winning choice since AWS provides their API that way.  Functionality may be available through the API before it is available in console.  Everything in the aws CLI command is built with this.  You can use jq to process JSON that comes back from running the aws command to do the same stuff in bash, but it is more work than python where you get a dictionary back and not have to parse any JSON.

Finally, using shellcheck is a good habit to get into when shell coding.