Skip to content

Commit

Permalink
remove unnecessary files
Browse files Browse the repository at this point in the history
  • Loading branch information
vnair-liveeo committed Apr 17, 2024
1 parent 2b66bd4 commit fb1a94c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 68 deletions.
10 changes: 0 additions & 10 deletions deployment/Dockerfile

This file was deleted.

34 changes: 18 additions & 16 deletions deployment/app.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
from aws_cdk import App, Duration, CfnOutput, Stack
from aws_cdk import aws_logs as logs
import aws_cdk.aws_lambda as _lambda
import os
from typing import Any, Dict, Optional

import aws_cdk.aws_apigatewayv2_alpha as apigatewayv2
import aws_cdk.aws_apigatewayv2_integrations_alpha as apigateway_integrations
from typing import Any, Optional, Dict
import os
import aws_cdk.aws_lambda as _lambda
from aws_cdk import App, CfnOutput, Duration, Stack
from aws_cdk import aws_logs as logs
from constructs import Construct

class STATDeploy(Stack):

def __init__(self, scope: Construct,
class STATDeploy(Stack):
def __init__(
self,
scope: Construct,
id: str,
memory: int = 1024,
timeout: int = 30,
runtime: _lambda.Runtime = _lambda.Runtime.PYTHON_3_11, #Set to 3.11 as the aws_cdk version does not have 3.12
runtime: _lambda.Runtime = _lambda.Runtime.PYTHON_3_11, # Set to 3.11 as the aws_cdk version does not have 3.12
concurrent: Optional[int] = None,
environment: Optional[Dict] = None,
code_dir:str = "/",
**kwargs:Any) -> None:
code_dir: str = "/",
**kwargs: Any,
) -> None:
super().__init__(scope, id, **kwargs)



lambda_function = _lambda.Function(
self,
f"{id}-lambda",
Expand All @@ -35,7 +37,7 @@ def __init__(self, scope: Construct,
reserved_concurrent_executions=concurrent,
timeout=Duration.seconds(timeout),
environment=environment,
log_retention=logs.RetentionDays.ONE_WEEK, #Honestly can be removed not sure if required at this stage
log_retention=logs.RetentionDays.ONE_WEEK, # Honestly can be removed not sure if required at this stage
)

api = apigatewayv2.HttpApi(
Expand All @@ -47,12 +49,12 @@ def __init__(self, scope: Construct,
)
CfnOutput(self, "Endpoint", value=api.url)


def main():
app = App()
STATDeploy(app, "MyCdkProjectStack")
app.synth()

if __name__ == '__main__':
main()


if __name__ == "__main__":
main()
41 changes: 0 additions & 41 deletions deployment/cdk_deployment.py

This file was deleted.

2 changes: 1 addition & 1 deletion deployment/handler.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from mangum import Mangum
from app import app
from mangum import Mangum

handler = Mangum(app)

0 comments on commit fb1a94c

Please sign in to comment.