38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
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
|
|
|
|
|