|
| 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 | + TransnetLambda: |
| 12 | + Type: AWS::Serverless::Function |
| 13 | + Properties: |
| 14 | + CodeUri: . |
| 15 | + Description: 'Tender Tool Web Crawler for the provider: Transnet' |
| 16 | + MemorySize: 128 |
| 17 | + Timeout: 120 |
| 18 | + Handler: lambda_function.lambda_handler |
| 19 | + Runtime: python3.13 |
| 20 | + Architectures: |
| 21 | + - x86_64 |
| 22 | + EphemeralStorage: |
| 23 | + Size: 512 |
| 24 | + EventInvokeConfig: |
| 25 | + MaximumEventAgeInSeconds: 21600 |
| 26 | + MaximumRetryAttempts: 2 |
| 27 | + Layers: |
| 28 | + - !Ref Layer1 |
| 29 | + PackageType: Zip |
| 30 | + Policies: |
| 31 | + - Statement: |
| 32 | + - Sid: SQSWriteOperations |
| 33 | + Effect: Allow |
| 34 | + Action: |
| 35 | + - sqs:SendMessage |
| 36 | + - sqs:GetQueueUrl |
| 37 | + - sqs:GetQueueAttributes |
| 38 | + Resource: '*' |
| 39 | + - Effect: Allow |
| 40 | + Action: |
| 41 | + - ec2:CreateNetworkInterface |
| 42 | + - ec2:DeleteNetworkInterface |
| 43 | + - ec2:DescribeNetworkInterfaces |
| 44 | + Resource: '*' |
| 45 | + - Effect: Allow |
| 46 | + Action: |
| 47 | + - logs:CreateLogGroup |
| 48 | + Resource: arn:aws:logs:us-east-1:211635102441:* |
| 49 | + - Effect: Allow |
| 50 | + Action: |
| 51 | + - logs:CreateLogStream |
| 52 | + - logs:PutLogEvents |
| 53 | + Resource: |
| 54 | + - >- |
| 55 | + arn:aws:logs:us-east-1:211635102441:log-group:/aws/lambda/TransnetLambda:* |
| 56 | + RecursiveLoop: Terminate |
| 57 | + SnapStart: |
| 58 | + ApplyOn: None |
| 59 | + RuntimeManagementConfig: |
| 60 | + UpdateRuntimeOn: Auto |
| 61 | + # This resource represents your Layer with name requests-library. To download |
| 62 | +# the content of your Layer, go to |
| 63 | +# |
| 64 | +# aws.amazon.com/go/view?arn=arn%3Aaws%3Alambda%3Aus-east-1%3A211635102441%3Alayer%3Arequests-library%3A2&source=lambda |
| 65 | + Layer1: |
| 66 | + Type: AWS::Serverless::LayerVersion |
| 67 | + Properties: |
| 68 | + ContentUri: ./requests-library |
| 69 | + LayerName: requests-library |
| 70 | + CompatibleRuntimes: |
| 71 | + - python3.13 |
0 commit comments