GithubHelp home page GithubHelp logo

Comments (5)

masberta avatar masberta commented on September 25, 2024

Hello,

It seems that some (not all) requests to the lambda function get base64 encoded, breaking the function and causing a 502 error.

I've done some digging and found that requests that work are like this:

{
  ...
  "body": "{\"execution_mode\": \"get\"}",
  "isBase64Encoded": "False"
}

But sometimes instead i get this:

{
  ...
  "body": "J3tleGVjdXRpb25fbW9kZTpnZXR9Jw==",
  "isBase64Encoded": "True"
}

If i add some code to decode that base64, it returns invalid json:

'{execution_mode:get}'

thanks @andrew-stclair is this happening with the same request getting this inconsistent behavior or is there a specific DNS name causing this? Do you have any non alphanumeric character in your domain name?

from route53-dynamic-dns-with-lambda.

andrew-stclair avatar andrew-stclair commented on September 25, 2024

Same request, always the first one it seems, subsequent requests seem to work as expected. I think it may be related to cold starts.

DNS address has standard english characters in it, nothing non alphanumeric.

I have made a temporary workaround by doing two get calls to the lambda, ignoring the first one.

from route53-dynamic-dns-with-lambda.

masberta avatar masberta commented on September 25, 2024

Same request, always the first one it seems, subsequent requests seem to work as expected. I think it may be related to cold starts.

DNS address has standard english characters in it, nothing non alphanumeric.

I have made a temporary workaround by doing two get calls to the lambda, ignoring the first one.

I will try to replicate the issue, can you confirm which Python runtime is set on your Lambda function?
Also, do you use the provided bash script to call the function or you use another method?

from route53-dynamic-dns-with-lambda.

andrew-stclair avatar andrew-stclair commented on September 25, 2024

My lambda function is on python 3.12

And i'm using the provided script, but first calling the lambda function via a get request before doing so.

from route53-dynamic-dns-with-lambda.

masberta avatar masberta commented on September 25, 2024

cannot replicate

from route53-dynamic-dns-with-lambda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.