0

I got an error for this line:

curl -X POST "http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/$REQUEST_ID/response"  -d "$RESPONSE"

curl: Argument list too long

How I could fix it?

  • 1
    What is the content of ${AWS_LAMBDA_RUNTIME_API} and ${REQUEST_ID} ? – gerhard d. Nov 18 '19 at 15:37
  • Could you share the obtained error message? – Paulo Tomé Nov 18 '19 at 15:38
  • Maybe this problem is related with the one depicted in stackoverflow.com/questions/54090784/… – Paulo Tomé Nov 18 '19 at 15:40
  • could you provide the output of echo "http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/$REQUEST_ID/response ### $RESPONSE"? – Eduardo Trápani Nov 18 '19 at 15:50
  • 1
    @gerhardd. It's more likely the $RESPONSE part that is the issue. – Kusalananda Nov 18 '19 at 16:07
-1

You can use @- to pass arguments from stdin ( curl -d @- < SOME_DATA ) or -d @filename to pass from file.

  • 2
    For a complete answer, you could describe what the actual issue is and how your suggestion would solve it? (I think you are probably right). The actual command that the user could try, using the variables in the question, would also be useful. – Kusalananda Nov 18 '19 at 15:43
  • thank you, could you put the whole solution here? what should be the line of code? something like this? curl -X POST "http://${AWS_LAMBDA_RUNTIME_API}/2018-06-01/runtime/invocation/$REQUEST_ID/response" -d @- "$RESPONSE" < some_data – Pzowghi Nov 18 '19 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.