question

newuser-09bc633e-1b02-4e3f-b02c-490e8b03b6fc avatar image

Failed to upload lambda function with error message: ValidationException ...

I tried to execute the following

ask deploy --> but lambda function did not update. so I tried

ask lambda upload -f index.js

and got the following message.

ValidationException: 1 validation error detected: Value 'index.js' at 'functionName' failed to satisfy constraint: Member must satisfy regular expression pattern: (arn:(aws[a-zA-Z-]*)?:lambda:)?([a-z]{2}(-gov)?-[a-z]+-\d{1}:)?(\d{12}:)?(function:)?([a-zA-Z0-9-_]+)(:(\$LATEST|[a-zA-Z0-9-_]+))?

alexa skills kitlambdasmapi
10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Amazon_Bernardo Bezerra avatar image
Amazon_Bernardo Bezerra answered

Hello! Thanks for your message.

I see that you having issues uploading your new/updated lambda function to AWS using ASK CLI. According to the documentation, when you use the -f flag, you should pass the name of the function, as it shows when you list your functions on the AWS portal (i.e. ask-custom-myFunction-default), not the file name.

Let me know if this solve your issue.

Regards,

Barry

10 |3000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.