For support requests please search or create posts on Serverless Forum: https://forum.serverless.com
carlosandrebp on master
upload email icon (compare)
carlosandrebp on master
Icons update (compare)
carlosandrebp on master
updates animations (compare)
andrepiresbp on master
Updates (compare)
andrepiresbp on master
Update (compare)
Hi guys, I'm trying to use functionResponseType
as specified here on serverless doc Setting the BatchSize but anything I've tried to doesn't worked, how can I return on my LambdaFunction a BatchResponse with only the failures messages like described on documentation.
Serverless example:
messageHandler:
tags:
event-type: queue
timeout: 10
handler: functions/handlers/messageHandler.handle
events:
- sqs:
arn:
Fn::GetAtt:
- MessagingQueue
- Arn
batchSize: 1000
maximumBatchingWindow: 30
functionResponseType: "ReportBatchItemFailures"
@atul.1055:matrix.org
https://www.serverless.com/framework/docs/providers/aws/events/streams
You need to add a stream event handler to your lambda
functions:
compute:
handler: handler.compute
events:
- stream:
type: dynamodb
arn:
Fn::GetAtt: [MyDynamoDbTable, StreamArn]
EMFILE: too many open files
.npx
but I don't understand how.Hi everyone, I am facing Serverless › ENOSPC: no space left on device, write
error when making a react deployment using npx serverless@2.64.1 deploy
More details here - actions/virtual-environments#4822. Any ideas on what exactly is the problem and a fix?
resources:
- ${file(resources/dynamo/UsersSubscriptionTable.yml)}
- ${file(resources/iam/UserRetrievalLambdaPolicy.yml)}
Outputs:
GatewayArn:
Description: "The API Gateway Dynamic ARN"
Value:
!Join
- ''
- - 'arn:aws:execute-api:us-west-2:1234'
- !Ref ApiGatewayRestApi
- '/*/GET/users'
Hey, hitting an error when trying to enable access logs on api gateway using this:
provider:
name: aws
runtime: python3.8
versionFunctions: false
logs:
httpApi: true
error looks like:An error occurred: HttpApiStage - Insufficient permissions to enable logging (Service: AmazonApiGatewayV2; Status Code: 400; Error Code: BadRequestException
any ideas on how to attach a role to solve this?
Generally, you need to add the permissions described at https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-logging.html to the CloudFormation role you use.
There can be 4 roles:
All 4 can be different if you want to. For this problem you'll likely need to change the 3rd one
If you don't have source_profile = in your .aws/config, then the second role is the same as the first role.
If you don't have the iam: DeploymentRole: in your serverless.yml, then the 3rd role is the same as the 2nd one
node_modules
. The zip file during packaging correctly contains what I would expect. I then have my package.patterns
setup like the below, yet no matter what I do, my main service's zip file STILL contains node_modules
. Because node_modules is in my main function's package, I can't view the function in the lambda web interface because its too large to display. Anyone have any ideas for how to properly have my node_modules
in a separate layer and get them OUT of the primary function package? I'm using serverless 0.70.0 layers:
nodeModules:
name: ${self:service.name}-${opt:stage,'dev'}-nodeModules
package:
include:
- ./**
path: lambda_layers
compatibleRuntimes:
- nodejs14.x
package:
patterns:
- '!**'
- '!node_modules/**'
- utils
- validation
- '*.js'