mhart/aws4fetch

Lambda Function URL decoding

Manouchehri opened this issue · 5 comments

At the moment, it doesn't appear that Lambda Function URLs are decoded properly. Here's an example of one:

ibvt72cx3dkyksnw7jktvkwhme0legmv.lambda-url.us-east-1.on.aws

https://docs.aws.amazon.com/lambda/latest/dg/lambda-urls.html

The format will always be:

https://<url-id>.lambda-url.<region>.on.aws

As a temporary workaround, I'm manually setting service and region.

const aws = new AwsClient({ accessKeyId: env.AWS_ACCESS_KEY_ID, secretAccessKey: env.AWS_SECRET_ACCESS_KEY, service: "lambda", region: "us-east-1" });

I've gone ahead and published this fork to use in the meantime: https://www.npmjs.com/package/@aimoda/aws4fetch

mhart commented

Setting service and region is a perfectly normal thing to do, supported by the API – I wouldn't call it a "workaround".

This is expected for any service created after this library was written

This is expected for any service created after this library was written

Right, that makes sense, which is why I made #48 for you. =)

mhart commented

Right, that makes sense, which is why I made #48 for you. =)

I appreciate that, including the test! Will get onto it in the next couple of days. Of course part of me doesn't want this library to keep growing with every new service – but hopefully they won't continue to add ones that use different URL schemes.