`amplify push` failing - Attribute: StreamArn was not found for resource

Viewed 1303

I'm having errors when executing the amplify push or amplify push function commands with the Amplify CLI.

Here's the error in the console (censored project-specific identifiers ):

...
UPDATE_FAILED      storage[dynamo db table name]       AWS::CloudFormation::Stack Tue Jan 19 2021 08:32:29 GMT+0800 (Philippine Standard Time) Embedded stack arn:aws:cloudformation:us-west-2:XXX:stack/amplify-XXX-XXX/XXX was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: Attribute: StreamArn was not found for resource: [dynamo db table name]
...

I've already tried:

  1. Execute amplify init again
  2. Execute amplify configure, create a new IAM user, and use the newly created user's credential.
  3. Going back to the commit where amplify push last worked, seeing the same error still.
  4. Recloned the repo and do the above steps. No luck.

I'll appreciate any help. Thanks.

2 Answers

In the AWS Console go to the DynamoDB Table under Table Overview, then Stream Details, then Manage Stream, click enable both New and Old Images.

If you get this error when deploy serverless config file, you must add stream type to your dynamodb table like this;

TableName:
  Type: AWS::DynamoDB::Table
  Properties:
    AttributeDefinitions:
      - AttributeName: id
        AttributeType: S
      - AttributeName: userId
        AttributeType: S
    KeySchema:
      - AttributeName: id
        KeyType: HASH
      - AttributeName: userId
        KeyType: RANGE
    ProvisionedThroughput:
      ReadCapacityUnits: 10
      WriteCapacityUnits: 10
    TableName: ${self:custom.TableName}
    StreamSpecification:
      StreamViewType: NEW_AND_OLD_IMAGES

StreamSpecification Types

Related