This message was deleted.
# aws
s
This message was deleted.
n
This one is very frustrating, since AWS api gateway by default seems to be setting base64 encoding to true by default, and expects params for POSTs also. Not sure if i’m more frustrated with the awsx sdk, pulumi, or api gateway on this one. but this shouldn’t be so difficult to override arguments like it is in this particular case.
f
Yeah I've found that some of the nooks and crannies are pretty inflexible for awsx since it's more of an extension library. Is decoding the event.body an option?
maybe something like this in your lambda
Copy code
let payloadString = event.body;
  if (event.isBase64Encoded) {
    // Decode base64 encoded string
    payloadString = Buffer.from(payloadString, 'base64').toString('binary');
  }
  // Parse payload string into an object
  const payload = JSON.parse(payloadString);
It doesn't get override the property, but at least it makes the encoded event.body usable
👍 1
n
yeah, basically have to do what you suggest with the buffer… thx for the response. otherwise, there are mapping templates that can be used also, but haven’t looked into that at all.