|
| 1 | +# This AWS SAM template has been generated from your function's configuration. If |
| 2 | +# your function has one or more triggers, note that the AWS resources associated |
| 3 | +# with these triggers aren't fully specified in this template and include |
| 4 | +# placeholder values. Open this template in AWS Infrastructure Composer or your |
| 5 | +# favorite IDE and modify it to specify a serverless application with other AWS |
| 6 | +# resources. |
| 7 | +AWSTemplateFormatVersion: '2010-09-09' |
| 8 | +Transform: AWS::Serverless-2016-10-31 |
| 9 | +Description: An AWS Serverless Application Model template describing your function. |
| 10 | +Resources: |
| 11 | + TenderCleanupHandler: |
| 12 | + Type: AWS::Serverless::Function |
| 13 | + Properties: |
| 14 | + CodeUri: . |
| 15 | + Description: >- |
| 16 | + Scheduled function to delete tenders from BaseTender whose closing date |
| 17 | + was over a month ago. Relies on DB cascade deletes. |
| 18 | + MemorySize: 128 |
| 19 | + Timeout: 60 |
| 20 | + Handler: lambda_function.lambda_handler |
| 21 | + Runtime: python3.9 |
| 22 | + Architectures: |
| 23 | + - x86_64 |
| 24 | + EphemeralStorage: |
| 25 | + Size: 512 |
| 26 | + Environment: |
| 27 | + Variables: |
| 28 | + DB_ENDPOINT: tender-tool-db.c2hq4seoidxc.us-east-1.rds.amazonaws.com |
| 29 | + DB_NAME: tendertool_db |
| 30 | + DB_PASSWORD: T3nder$Tool_DB_2025! |
| 31 | + DB_USER: CleanupAppUser |
| 32 | + EventInvokeConfig: |
| 33 | + MaximumEventAgeInSeconds: 21600 |
| 34 | + MaximumRetryAttempts: 2 |
| 35 | + Layers: |
| 36 | + - !Ref Layer1 |
| 37 | + PackageType: Zip |
| 38 | + Policies: |
| 39 | + - Statement: |
| 40 | + - Effect: Allow |
| 41 | + Action: |
| 42 | + - logs:CreateLogGroup |
| 43 | + - logs:CreateLogStream |
| 44 | + - logs:PutLogEvents |
| 45 | + Resource: '*' |
| 46 | + RecursiveLoop: Terminate |
| 47 | + SnapStart: |
| 48 | + ApplyOn: None |
| 49 | + RuntimeManagementConfig: |
| 50 | + UpdateRuntimeOn: Auto |
| 51 | + # This resource represents your Layer with name analytics-layer. To download |
| 52 | +# the content of your Layer, go to |
| 53 | +# |
| 54 | +# aws.amazon.com/go/view?arn=arn%3Aaws%3Alambda%3Aus-east-1%3A211635102441%3Alayer%3Aanalytics-layer%3A2&source=lambda |
| 55 | + Layer1: |
| 56 | + Type: AWS::Serverless::LayerVersion |
| 57 | + Properties: |
| 58 | + ContentUri: ./analytics-layer |
| 59 | + LayerName: analytics-layer |
| 60 | + CompatibleRuntimes: |
| 61 | + - python3.9 |
0 commit comments