serverless / serverless/serverless
EventBridge event doesn't point to version/alias of provisionedConcurrency Lambda
@deasydoesit is already working on this.
Since May 12, 2023.
- Dominant language
- JavaScript
- Stars
- 46.9k
- Forks
- 5.7k
- Avg merge
- 10h 7m
- Merged PRs (30d)
- 57
Description
Are you certain it's a bug?
- Yes, it looks like a bug
Is the issue caused by a plugin?
- It is not a plugin issue
Are you using the latest v3 release?
- Yes, I'm using the latest v3 release
Is there an existing issue for this?
- I have searched existing issues, it hasn't been reported yet
Issue description
I have a Lambda function, myFunc, which has been given provisionedConcurrency and is invoked asynchronously via an EventBridge event.
However, while a new version with the alias provisioned gets created for myFunc, the ARN of the EventBridge event doesn't point to the Qualified ARN for the alias (e.g., arn:aws:lambda:aws-region:acct-id:function:myFunc:provisioned) or version (e.g., arn:aws:lambda:aws-region:acct-id:function:myFunc:42), and instead points to the Unqualified ARN (e.g., arn:aws:lambda:aws-region:acct-id:function:myFunc).
Accordingly, the provisioned lambdas do not get utilized.
Service configuration (serverless.yml) content
functions:
myFunc:
handler: src/index.handler
environment:
DEST_BUCKET: ${self:custom.DEST_BUCKET}
REGION: ${env:REGION}
timeout: 15
logRetentionInDays: 30
provisionedConcurrency: 10
reservedConcurrency: 50
name: myFunc
description: Replicates S3 objects between buckets
role: arn:aws:iam::${aws:accountId}:role/myFuncRole
vpc:
securityGroupIds:
- ${ssm:/vpc/security_group_id}
subnetIds:
- ${ssm:/vpc/private_subnet_id_a}
- ${ssm:/vpc/private_subnet_id_b}
maximumRetryAttempts: 2
maximumEventAge: 21600
onError: ${ssm:/sqs/dlq_arn}
events:
- eventBridge:
pattern:
source:
- "aws.s3"
detail-type:
- "Object Created"
detail:
bucket:
name: ${ssm:/s3/bucket_names}
retryPolicy:
maximumEventAge: 86400
maximumRetryAttempts: 185
deadLetterQueueArn: ${ssm:/sqs/dlq_arn}
Command name and used flags
N/A
Command output
N/A
Environment information
Framework Core: 3.27.0
Plugin: 6.2.3
SDK: 4.3.2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.