Closed
Description
In my project I'm using DynamoDB streams to trigger a Lambda. However the Alias plugin seems to prevent a regular redeploy of the project. Only the first deploy worked as expected.
This is the error thrown in CloudWatch during deployment (Checking Stack update progress):
An error occurred: my-project-dev - Export my-project-dev-MyTableStreamArn cannot be updated as it is in use by my-project-dev-dev.
The relevant parts of the serverless.yaml
are:
# [...]
functions:
myLambdaFunc:
handler: handlers/myLambdaFunc.handler
timeout: 300
events:
# Run once a day (midnight UTC)
- schedule: cron(0 0 * * ? *)
# Also trigger if anything relevant in the database changes
- stream:
type: dynamodb
arn:
Fn::GetAtt:
- MyTable
- StreamArn
resources:
# AWS CloudFormation Template
Resources:
MyTable:
Type: AWS::DynamoDB::Table
DeletionPolicy: Retain
Properties:
StreamSpecification:
StreamViewType: KEYS_ONLY
AttributeDefinitions:
- # [...]
KeySchema:
- # [...]
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
GlobalSecondaryIndexes:
- # [...]
I will have to spend more time figuring out what exactly causes this problem as none of the resources are actually supposed to change during the deploy. But as for right now, it seems I cannot properly use DynamoDB streams as Lambda triggers in combination with the Alias plugin.
Metadata
Metadata
Assignees
Labels
No labels