Memory size error
Closed this issue · 2 comments
pardoxp commented
Hello I hope I can find help on this here I'm using this plugin but I'm getting this error:
The function memory size is larger than the maximum allowed size for functions that are triggered by a CloudFront event: 1024 Max allowed: 128 Function: arn:aws:lambda:us-east-1:987558555805:function:test-develop-appointment:18
and I couldn't find a reason, not sure if is related to the way - serverless-bundle is packaging the function, this is my serverless.yml overview if this helps:
service: test
package:
individually: true
plugins:
- serverless-bundle
- serverless-offline
- serverless-dotenv-plugin
- serverless-lambda-edge-pre-existing-cloudfront
custom:
stage: ${opt:stage, env:STAGE}
profile: ${env:PROFILE, default}
tableName: ${self:custom.stage}-journeys
distributionId: ${env:DISTRIBUTION_ID}
provider:
name: aws
runtime: nodejs12.x
stage: ${self:custom.stage}
region: us-east-1
profile: ${self:custom.profile}
environment:
tableName: ${self:custom.tableName}
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:DescribeTable
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource:
- { "Fn::GetAtt": [JourneysTable, Arn ] }
- Fn::Join:
- "/"
-
- { "Fn::GetAtt": [JourneysTable, Arn ] }
- "index/*"
functions:
appointment:
handler: appointment.main
events:
- preExistingCloudFront:
distributionId: ${self:custom.distributionId}
eventType: viewer-request
pathPattern: '*'
includeBody: false
resources:
- ${file(resources/api-gateway-errors.yml)}
- ${file(resources/dynamodb-table.yml)}
rhyek commented
anyone have any details on this? @admehta01 do you remember if/how you fixed it?