fixing the auto-twooter
Yesterday, I wrote up a little post, and was disappointed to see that my auto-posting Lambda failed to send anything out. This morning, I figured out why and fixed it up. Read on!
Originally, the auto-posting Lambda was set up to post both to the Fediverse and to The Site Formerly Known As Twitter (TSFKAT from this point on…) It’s, ummm, been a hot minute since I wrote anything here, and in that intervening time, the new owner of TSFKAT removed API-based posting (at least from the unwashed masses…)
The code was set up to try first TSFKAT and then Fediverse posting,
all in a single try/catch
block – so when the TSFKAT post attempt
threw an exception, the Fediverse post attempt wasn’t even tried.
The solution was obvious: excise the hell site from the codebase. That’s been done, and I also did a whole bunch of other deferred maintenance work, and now hopefully when I deploy this new post, I will see a toot! Let’s find out…
UPDATE: No, it’s NOT actually fucking fixed, because I also updated the Lambda runtime to v20 (because it was on v16 and that’s EOL’d), which means I need to switch from v2 to v3 of the AWS SDK, and OF COURSE Amazon decided that a completely new version of the API would be a fine and dandy thing to do. More later, I guess.
UPDATE 2: Okay, now it’s fixed (evidence!) Not only did I end up needing to upgrade to AWS-SDK v3 in order to support the upgrade to v20 of the Node runtime, I also needed to reconfigure the thing to point to my current Masto instance instead of the old one, and I needed to configure an app there to get an updated access token. Clearly, as always, the lesson here should be: software, not even once.