Skip to content

Commit 48cc409

Browse files
committed
Add SAM to sample
1 parent 1787df8 commit 48cc409

File tree

4 files changed

+48
-0
lines changed
  • spring-cloud-function-adapters/spring-cloud-function-adapter-aws/src/test/resources/META-INF
  • spring-cloud-function-samples/function-sample-aws

4 files changed

+48
-0
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,5 @@ node_modules
3737
build
3838
package.json
3939
package-lock.json
40+
*samconfig.toml
41+
*.aws-sam/
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
eventSourceARN, ApproximateCreationDateTime
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
routeKey
2+
rawQueryString
3+
path
4+
resource
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
AWSTemplateFormatVersion: '2010-09-09'
2+
Transform: AWS::Serverless-2016-10-31
3+
Description: Example function as lambda deployment
4+
5+
Globals:
6+
Api:
7+
# API Gateway regional endpoints
8+
EndpointConfiguration: REGIONAL
9+
10+
Resources:
11+
PetStoreMVC:
12+
Type: AWS::Serverless::Function
13+
Properties:
14+
# AutoPublishAlias: bcn
15+
FunctionName: uppercase
16+
Handler: org.springframework.cloud.function.adapter.aws.FunctionInvoker::handleRequest
17+
Runtime: java17
18+
SnapStart:
19+
ApplyOn: PublishedVersions
20+
CodeUri: .
21+
MemorySize: 1024
22+
Policies: AWSLambdaBasicExecutionRole
23+
Timeout: 30
24+
Environment:
25+
Variables:
26+
MAIN_CLASS: example.FunctionConfiguration
27+
Events:
28+
HttpApiEvent:
29+
Type: HttpApi
30+
Properties:
31+
TimeoutInMillis: 20000
32+
PayloadFormatVersion: '1.0'
33+
34+
Outputs:
35+
PetStoreMVCApi:
36+
Description: URL for application
37+
Value: !Sub 'https://${ServerlessHttpApi}.execute-api.${AWS::Region}.amazonaws.com/uppercase'
38+
Export:
39+
Name: UppercaseAPI
40+
41+

0 commit comments

Comments
 (0)