Add spring-cloud-function-serverless-web module

This commit is contained in:
Oleg Zhurakousky
2023-03-06 18:43:33 +01:00
parent fcf6315a53
commit 346ceb4744
23 changed files with 3516 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Example Pet Store API written with spring-cloud-function web-proxy support
Globals:
Api:
# API Gateway regional endpoints
EndpointConfiguration: REGIONAL
Resources:
PetStoreFunction:
Type: AWS::Serverless::Function
Properties:
Handler: org.springframework.cloud.function.adapter.aws.web.WebProxyInvoker::handleRequest
Runtime: java11
CodeUri: .
MemorySize: 512
Policies: AWSLambdaBasicExecutionRole
Timeout: 30
Environment:
Variables:
MAIN_CLASS: oz.spring.petstore.PetStoreSpringAppConfig
Events:
HttpApiEvent:
Type: HttpApi
Properties:
TimeoutInMillis: 20000
PayloadFormatVersion: '1.0'
Outputs:
SpringPetStoreApi:
Description: URL for application
Value: !Sub 'https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com/pets'
Export:
Name: PetStoreLambda