Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback for “PHP functions runtime for AWS Lambda” #1925

Open
bryanzarzuela opened this issue Mar 11, 2025 · 0 comments
Open

Feedback for “PHP functions runtime for AWS Lambda” #1925

bryanzarzuela opened this issue Mar 11, 2025 · 0 comments

Comments

@bryanzarzuela
Copy link

In the documentation, it is suggested that whatever function name you configured in serverless.yml should be used when invoking the function from another PHP application.

$result = $lambda->invoke([
    'FunctionName' => '<function-name>',
    'InvocationType' => 'RequestResponse',
    'LogType' => 'None',
    'Payload' => json_encode(/* event data */),
]);

However, this is not the case. You must use the name as it appears in the list of Lambda functions in the AWS console. I suggest the documentation be updated to explain this.

Also, if your Lambda function was created from another account and you want another IAM user to call that function, you'll need to remember to define a resource-based policy on the Lambda function itself to allow the lambda:InvokeFunction to the ARN of that other IAM user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant