Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when re-deploying #32

Open
TimMensch opened this issue Oct 17, 2017 · 5 comments
Open

Error when re-deploying #32

TimMensch opened this issue Oct 17, 2017 · 5 comments

Comments

@TimMensch
Copy link

I'm seeing this error on deploy:

An error occurred: myapiAutoScalingTargetWrite7b99aba1d7be2b722192793defb4676 - table/my-api-alpha-checkin|dynamodb:table:WriteCapacityUnits|dynamodb already exists.

Considering re-deploying is how I've been testing, this is a problem. Worse, just deleting the table doesn't help. So for now I've had to disable serverless-dynamodb-autoscaling so that I can deploy at all.

Thoughts?

@TimMensch
Copy link
Author

Further information: It just doesn't seem to work for me at all. I did a completely clean deploy and it still failed.

I'm trying to create and autoscale four DynamoDB tables. Here are some relevant serverless.yml excerpts from the table that failed first (though they all failed):

    capacities:
      - table: TagDynamoDbTable
      read:
        minimum: 5       # Minimum read capacity
        maximum: 1000    # Maximum read capacity
        usage: 0.75      # Targeted usage percentage
      write:
        minimum: 5       # Minimum write capacity
        maximum: 1000    # Maximum write capacity
        usage: 0.75      # Targeted usage percentage

The Dynamo Table:

    TagDynamoDbTable:
      Type: AWS::DynamoDB::Table
      Properties:
        AttributeDefinitions:
          - AttributeName: mac
            AttributeType: S
          - AttributeName: timestamp
            AttributeType: N
        KeySchema:
          - AttributeName: mac
            KeyType: HASH
          - AttributeName: timestamp
            KeyType: RANGE
        ProvisionedThroughput:
          ReadCapacityUnits: 5
          WriteCapacityUnits: 1000
        StreamSpecification:
            StreamViewType: "NEW_IMAGE"
        TableName: ${self:provider.environment.DYNAMODB_TAG_TABLE}

And the error:

  An error occurred: myapiAutoScalingTargetReadTagDynamoDbTableAlphaUswest1 - table/my-api-alpha-tag|dynamodb:table:ReadCapacityUnits|dynamodb already exists.                           
``

This is after the CloudFormation template was completely deleted and re-created.

@RyanCodes
Copy link

@TimMensch ever figure this out?

@TimMensch
Copy link
Author

Sorry, but this happened long enough ago that I don't recall how I resolved it.

I think I ditched all auto-scaling from within serverless though. At this point this seems like an abandoned sub-project; pretty sure I uninstalled this entire plugin and decided that it was useless. Sorry.

@RyanCodes
Copy link

thanks for the response @TimMensch appreciate it!

@ashtonmeuser
Copy link

I faced this issue quite a while ago as well. Unlike Tim, however, I am still using this plugin and it seems to be working great.
If memory serves, this problem was resolved by renaming the Dynamo DB table resource name in serverless.yml. You should be able to rename it to the original after deploying. As far as I remember, this was caused by CloudFormation choking.
Forgive me if this doesn’t work for you. I think it’s been roughly a year since seeing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants