fix: resolve Lambda invocation failure from API Gateway
- Align Dockerfile with AWS official documentation for provided runtime - Remove DefinitionBody from SAM template to avoid conflict with Events property - This enables SAM to automatically generate AWS::Lambda::Permission resource - Fixes 500 error when Forgejo webhook triggers API Gateway endpoint"
This commit is contained in:
parent
a59a8e6461
commit
8cd30da394
2 changed files with 1 additions and 25 deletions
|
|
@ -105,29 +105,6 @@ Resources:
|
|||
Name: blog-deployment-webhook-api
|
||||
StageName: !Ref StageName
|
||||
EndpointConfiguration: REGIONAL
|
||||
DefinitionBody:
|
||||
openapi: "3.0.1"
|
||||
info:
|
||||
title: "Forgejo Webhook API"
|
||||
version: "1.0"
|
||||
paths:
|
||||
/forgejo-webhook:
|
||||
post:
|
||||
summary: "Trigger Lambda via Forgejo Webhook"
|
||||
x-amazon-apigateway-integration:
|
||||
uri:
|
||||
Fn::Sub: arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${MyLambdaFunction.Arn}/invocations
|
||||
httpMethod: POST
|
||||
type: aws_proxy
|
||||
responses:
|
||||
'200':
|
||||
description: "Successful response"
|
||||
'400':
|
||||
description: "Bad Request - Incorrect request payload format"
|
||||
'401':
|
||||
description: "Unauthorized - Signature verification failed"
|
||||
'500':
|
||||
description: "Server error - Deployment process failed"
|
||||
|
||||
Outputs:
|
||||
ApiEndpoint:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue