Skip to content

Commit

Permalink
Migrated the project to Al2023 runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
lakshayman committed Jan 15, 2024
1 parent d4d124b commit ae71810
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ We are using AWS SAM(Serverless Application Model) with [golang](https://go.dev/
```
/profile
/verify
/healthCheck
/health
```

## State Machine Diagram
Expand Down
71 changes: 41 additions & 30 deletions template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Description: >
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 900
Timeout: 5
MemorySize: 128
Environment:
Variables:
firestoreCred: YourFirestoreCredentials
Expand All @@ -18,35 +19,34 @@ Globals:
Resources:
HealthCheckFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Metadata:
BuildMethod: go1.x
Properties:
CodeUri: health-check/
Handler: health-check
Runtime: go1.x
Handler: bootstrap
Runtime: provided.al2023
Architectures:
- x86_64
Tracing: Active # https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html
Tracing: Active
Events:
CatchAll:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
Path: /healthCheck
Path: /health
Method: GET

ProfileFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Metadata:
BuildMethod: go1.x
Properties:
CodeUri: profile/
Handler: profile
Runtime: go1.x
Handler: bootstrap
Runtime: provided.al2023
Architectures:
- x86_64
Tracing: Active # https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html
Tracing: Active
Events:
ScheduledEvent:
Type: Schedule
Properties:
Schedule: cron(0 18 ? * WED *)
Enabled: True
CatchAll:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
Expand All @@ -55,48 +55,59 @@ Resources:

VerifyFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Metadata:
BuildMethod: go1.x
Properties:
CodeUri: verify/
Handler: verify
Runtime: go1.x
Handler: bootstrap
Runtime: provided.al2023
Architectures:
- x86_64
Tracing: Active # https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html
Tracing: Active
Events:
CatchAll:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
Path: /verify
Method: POST

CallProfileFunction:
CallProfilesFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Metadata:
BuildMethod: go1.x
Properties:
CodeUri: call-profile/
Handler: call-profile
Runtime: go1.x
CodeUri: call-profiles/
Handler: bootstrap
Runtime: provided.al2023
Architectures:
- x86_64
Tracing: Active # https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html
Tracing: Active
Events:
ScheduledEvent:
Type: Schedule
Properties:
Schedule: cron(0 18 ? * WED *)
Enabled: True
CatchAll:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
Path: /call-profile
Method: POST
Path: /profiles
Method: GET

CallProfilesFunction:
CallProfileFunction:
Type: AWS::Serverless::Function # More info about Function Resource: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#awsserverlessfunction
Metadata:
BuildMethod: go1.x
Properties:
CodeUri: call-profiles/
Handler: call-profiles
Runtime: go1.x
CodeUri: call-profile/
Handler: bootstrap
Runtime: provided.al2023
Architectures:
- x86_64
Tracing: Active # https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html
Tracing: Active
Events:
CatchAll:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
Path: /profiles
Method: GET
Path: /call-profile
Method: POST

0 comments on commit ae71810

Please sign in to comment.