1 個回答
- 最新
- 最多得票
- 最多評論
0
Yes the same IAM integrations apply for HTTP APIs as for REST APIs. The same IAM integrations apply for controlling access to API endpoints (HTTP and REST) as well as invoking backend AWS services like Lambda.
More specifically you can refer to this public blog post for HTTP APIs and adding permissions to invoke a Lambda function that is integrated with an HTTP API endpoint:
Don’t forget that you will need to add a Lambda resource policy permission to the function to allow API Gateway to invoke your function. For example:
aws lambda add-permission
--statement-id dd0dffb7-971e-5952-9699-38493cf34293
--action lambda:InvokeFunction
--function-name "arn:aws:lambda:us-west-1:[your account number]:function:Echo"
--principal apigateway.amazonaws.com
--source-arn "arn:aws:execute-api:us-west-1:[your accunt number]:[your gateway id]/"
已回答 4 年前
相關內容
- AWS 官方已更新 2 年前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 6 個月前