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

Will withAutoCreateTable(true) always try to create a table? #707

Open
TommyQu opened this issue Feb 8, 2022 · 2 comments
Open

Will withAutoCreateTable(true) always try to create a table? #707

TommyQu opened this issue Feb 8, 2022 · 2 comments

Comments

@TommyQu
Copy link

TommyQu commented Feb 8, 2022

We found a bunch of errors in our cloudtrail event as below, seems some processes are trying to create an existing table constantly.

 "eventTime": "2022-02-07T01:45:48Z",
    "eventSource": "dynamodb.amazonaws.com",
    "eventName": "CreateTable",
    "awsRegion": "us-east-1",
    "userAgent": "aws-sdk-nodejs/2.1001.0 linux/v12.22.7 exec-env/AWS_Lambda_nodejs12.x callback",
    "errorCode": "ResourceInUseException",
    "errorMessage": "Table already exists: xxx",

In index.js, we are doing something like below

exports.handler = Alexa.SkillBuilders.standard()
--
  | .addRequestHandlers(...IntentHandlers, ...AudioIntentHandlers)
  | .addErrorHandlers(ErrorHandler)
  | .addRequestInterceptors(...Interceptors.request)
  | .addResponseInterceptors(...Interceptors.response)
  | .withSkillId(constants.SKILL_ID)
  | .withTableName(constants.xxx)
  | .withAutoCreateTable(true)
  | .lambda();

I'm wondering will withAutoCreateTable(true) always try to create a table even if it exists? So it will throw ResourceInUseException as above that will be shown in Lambda function's error metric?

@TommyQu
Copy link
Author

TommyQu commented Feb 9, 2022

Tested, seems such error won't show in Lambda function's error metric

@rahulawl
Copy link
Contributor

Is this issue/feature-request still relevant?
We are working on prioritization of relevant issues and cleanup of rest. If we don’t hear back in 2 weeks, we will assume that the issue is not relevant and we will close it.

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

No branches or pull requests

3 participants