Skip to content

Unable to grant invoke lambda in MySQL workbench (5.6.mysql_aurora.1.22.2)

0

Hi,

I am trying to set up a Lambda function invoked by a MySQL db. I have been following the documentation:

https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraMySQL.Integrating.Lambda.html#AuroraMySQL.Integrating.NativeLambda.lambda_functions

Now I am stuck when I tried to do
GRANT INVOKE LAMBDA ON . TO user@domain-or-ip-address
and MySQL workbench shows error: "INVOKE" is not valid at this position for this server version, expecting an identifier
The engine version is 5.6.mysql_aurora.1.22.2

any help is greatly appreciated
Thanks

Edited by: JackMMI on Oct 13, 2021 10:18 AM

Update:
I was able to GRANT INVOKE LAMBDA in MySQL CLI tool

Edited by: JackMMI on Oct 14, 2021 2:14 PM

asked 4 years ago455 views
2 Answers
0

Use MySQL CLI

answered 4 years ago
0

The error message "INVOKE is not valid at this position for this server version" typically occurs when the MySQL Workbench doesn't recognize the syntax. This could be due to a version mismatch between the MySQL Workbench and the MySQL server⁴.

In your case, you're trying to use the GRANT INVOKE LAMBDA command, which is specific to AWS Aurora MySQL and may not be recognized by the MySQL Workbench.

You mentioned that you were able to run the GRANT INVOKE LAMBDA command successfully in the MySQL CLI tool. This suggests that the issue is specific to MySQL Workbench.

If you continue to face issues with MySQL Workbench, consider using the MySQL CLI tool or another SQL client that supports the AWS-specific commands.

Remember to replace user@domain-or-ip-address with the actual username and host for your MySQL user. For example, if your username is myuser and the host is localhost, the command would be GRANT INVOKE LAMBDA ON *.* TO 'myuser'@'localhost'.

I hope this helps! Let me know if you have any other questions. 😊

EXPERT
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.