serverless / serverless

⚡ Serverless Framework – Effortlessly build apps that auto-scale, incur zero costs when idle, and require minimal maintenance using AWS Lambda and other managed cloud services.
https://serverless.com
MIT License
46.39k stars 5.7k forks source link

Installation: aws dynamodb ResourceNotFoundException #9521

Closed senorblackbean closed 3 years ago

senorblackbean commented 3 years ago

During the installation process from github, I ran into an error with dynamodb:

$ aws dynamodb batch-write-item --request-items file://backend/serverless/scripts/create-inventory-data.json

An error occurred (ResourceNotFoundException) when calling the BatchWriteItem operation: Requested resource not found

I was able to work around this by manually creating the DVSA-INVENTORY-DB table and re-running the command. For whatever reason, the table is not being created before inserting data.

serverless.yml ```yaml ################################################# # DVSA: a Damn Vulnerable Serverless Application # ################################################## service: dvsa provider: name: aws runtime: python3.6 stage: ${env:USER} versionFunctions: false region: us-east-1 timeout: 30 memorySize: 128 package: individually: true excludeDevDependencies: false exclude: - ./** plugins: - serverless-finch - serverless-offline - serverless-stack-output - serverless-scriptable-plugin custom: stage: ${opt:stage, self:provider.stage} accountId: ${file(backend/serverless/scripts/vars.js):accountId} client: bucketName: dvsa-website-${self:custom.accountId} distributionFolder: client/dist errorDocument: index.html output: file: ./client/src/be-stack.json scriptHooks: before:package:cleanup: python backend/serverless/scripts/onstart.py after:package:finalize: python backend/serverless/scripts/verifysesaccount.py --verify after:deploy:finalize: aws dynamodb batch-write-item --request-items file://backend/serverless/scripts/create-inventory-data.json after:remove:remove: python backend/serverless/scripts/verifysesaccount.py --remove functions: - ${file(backend/src/functions/order-api/sls.yml):functions} - ${file(backend/src/functions/order/sls.yml):functions} - ${file(backend/src/functions/processing/sls.yml):functions} - ${file(backend/src/functions/admin/sls.yml):functions} - ${file(backend/src/functions/cronjobs/sls.yml):functions} - ${file(backend/src/functions/user/sls.yml):functions} resources: # Resources: - ${file(backend/serverless/resources/cognito-user-pool.yml)} - ${file(backend/serverless/resources/cognito-identity-pool.yml)} - ${file(backend/serverless/resources/api-gateway.yml)} - ${file(backend/serverless/resources/dynamodb-tables.yml)} - ${file(backend/serverless/resources/s3-buckets.yml)} - ${file(backend/serverless/resources/function-roles.yml)} # Function Resources - ${file(backend/src/functions/order-api/sls.yml):resources} - ${file(backend/src/functions/processing/sls.yml):resources} ```
aws dynamodb batch-write-item --request-items file://backend/serverless/scripts/create-inventory-data.json output ``` An error occurred (ResourceNotFoundException) when calling the BatchWriteItem operation: Requested resource not found ```

Installed version

Serverless: Running "serverless" installed locally (in service node_modules)
Framework Core: 2.22.0 (local)
Plugin: 4.4.2
SDK: 2.3.2
Components: 3.6.1
pgrzesik commented 3 years ago

Hello @senorblackbean - from the report it seems like the problem you're experiencing is not with the Framework itself, but rather with some additional commands which are run with awscli, not sls. If it's a part of some bigger project, I would suggest to report the issue there. Please let me know if that's the case so we can close the issue. Thanks in advance :bow:

senorblackbean commented 3 years ago

It is not part of some bigger project. I'm just following the README.md and had this error when running 'sls deploy'.

How does the table get created? I can try checking if that is broke.

$ sls deploy
Serverless: Deprecation warning: Variables resolver reports following resolution errors:
              - Cannot resolve variable at "custom.accountId": Cannot resolve "accountId" out of "vars.js": Resolved a JS function not confirmed to work with a new parser, falling back to old resolver
            From a next major this will be communicated with a thrown error.
            Set "variablesResolutionMode: 20210326" in your service config, to adapt to new behavior now
            More Info: https://www.serverless.com/framework/docs/deprecations/#NEW_VARIABLES_RESOLVER
Serverless: Running "serverless" installed locally (in service node_modules)
Serverless: To ensure safe major version upgrades ensure "frameworkVersion" setting in service configuration (recommended setup: "frameworkVersion: ^2.22.0")

Serverless: Load command interactiveCli
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command config:tabcompletion
Serverless: Load command config:tabcompletion:install
Serverless: Load command config:tabcompletion:uninstall
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command upgrade
Serverless: Load command uninstall
Serverless: Load command client
Serverless: Load command client:deploy
Serverless: Load command client:remove
Serverless: Load command offline
Serverless: Load command offline:start
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command generate-event
Serverless: Load command test
Serverless: Load command dashboard
Serverless: Load command output
Serverless: Load command output:get
Serverless: Load command output:list
Serverless: Load command param
Serverless: Load command param:get
Serverless: Load command param:list
Serverless: Load command studio
Serverless: Deprecation warning: CLI options definitions were upgraded with "type" property (which could be one of "string", "boolean", "multiple"). Below listed plugins do not predefine type for introduced options:
             - Offline for "prefix", "host", "port", "stage", "region", "skipCacheInvalidation", "cacheInvalidationRegex", "httpsProtocol", "location", "noTimeout", "binPath", "noEnvironment", "resourceRoutes", "printOutput", "corsAllowOrigin", "corsAllowHeaders", "corsExposedHeaders", "corsDisallowCredentials", "apiKey", "exec", "noAuth", "useSeparateProcesses", "preserveTrailingSlash", "disableCookieValidation", "enforceSecureCookies", "providedRuntime", "disableModelValidation"
            Please report this issue in plugin issue tracker.
            Starting with next major release, this will be communicated with a thrown error.
            More Info: https://www.serverless.com/framework/docs/deprecations/#CLI_OPTIONS_SCHEMA
Serverless: Deprecation warning: Starting with next major version, API Gateway naming will be changed from "{stage}-{service}" to "{service}-{stage}".
            Set "provider.apiGateway.shouldStartNameWithService" to "true" to adapt to the new behavior now.
            More Info: https://www.serverless.com/framework/docs/deprecations/#AWS_API_GATEWAY_NAME_STARTING_WITH_SERVICE
Serverless: Invoke deploy
Serverless: Invoke package
Running command: python backend/serverless/scripts/onstart.py
############################################################################
#                                                                          #
#                    ██████╗ ██╗   ██╗███████╗ █████╗                      #
#                    ██╔══██╗██║   ██║██╔════╝██╔══██╗                     #
#                    ██║  ██║██║   ██║███████╗███████║                     #
#                    ██║  ██║╚██╗ ██╔╝╚════██║██╔══██║                     #
#                    ██████╔╝ ╚████╔╝ ███████║██║  ██║                     #
#                    ╚═════╝   ╚═══╝  ╚══════╝╚═╝  ╚═╝                     #
#                                                                          #
#          WARNING! Do NOT install DVSA on a production account            #
#                                                                          #
#     You are deploying DVSA: a Damn vulnerable Serverless Application     #
#            This project was developed by Tal Melamed (@4ppsec)           #
#      Please read all the necessary information on the project page:      #
#  https://github.com/owasp/dvsa | online version: http://serverless.fail  #
#                                                                          #
############################################################################

Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Packaging service...
Serverless: Installing dependencies for custom CloudFormation resources...
Serverless: Invoke aws:package:finalize
Serverless: Invoke aws:common:moveArtifactsToPackage
Running command: python backend/serverless/scripts/verifysesaccount.py --verify
SES Email account verification for: dvsa.noreply@mailsac.com
- requesting account verification...
 [OK]
- verifying verification mail received...
[ERR] Could not verify email account.

Make sure you've specified a region using "aws configure" and try again ($python backend/serverless/scripts/verifysesaccount.py), or manually browse to: https://mailsac.com/inbox/noreply.dvsa@mailsac.com and approve the email account
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:deploy:deploy
Serverless: [AWS cloudformation 200 0.153s 0 retries] describeStacks({ StackName: 'dvsa-ubuntu' })
Serverless: [AWS cloudformation 200 0.111s 0 retries] describeStackResource({ StackName: 'dvsa-ubuntu',
  LogicalResourceId: 'ServerlessDeploymentBucket' })
Serverless: [AWS s3 200 0.249s 0 retries] listObjectsV2({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Prefix: 'serverless/dvsa/ubuntu' })
Serverless: [AWS s3 200 0.11s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/compiled-cloudformation-template.json' })
Serverless: [AWS s3 200 0.123s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/custom-resources.zip' })
Serverless: [AWS s3 200 0.097s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/UserProfile.zip' })
Serverless: [AWS s3 200 0.095s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/UserInbox.zip' })
Serverless: [AWS s3 200 0.091s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/UserCreate.zip' })
Serverless: [AWS s3 200 0.094s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/UserAccount.zip' })
Serverless: [AWS s3 200 0.098s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/PaymentProcessor.zip' })
Serverless: [AWS s3 200 0.136s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/SendReceipt.zip' })
Serverless: [AWS s3 200 0.067s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/OrderShipping.zip' })
Serverless: [AWS s3 200 0.149s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/OrderUpdate.zip' })
Serverless: [AWS s3 200 0.064s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/OrderNew.zip' })
Serverless: [AWS s3 200 0.09s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/OrderBilling.zip' })
Serverless: [AWS s3 200 0.104s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/OrderManager.zip' })
Serverless: [AWS s3 200 0.109s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/GetOrders.zip' })
Serverless: [AWS s3 200 0.114s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/GetTotal.zip' })
Serverless: [AWS s3 200 0.107s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/FeedbackUploads.zip' })
Serverless: [AWS s3 200 0.124s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/GetOrder.zip' })
Serverless: [AWS s3 200 0.095s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/CronProcessor.zip' })
Serverless: [AWS s3 200 0.118s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/CronOrderCleaner.zip' })
Serverless: [AWS s3 200 0.105s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/CronJobUpdate.zip' })
Serverless: [AWS s3 200 0.087s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/CreateReceipt.zip' })
Serverless: [AWS s3 200 0.067s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/CancelOrder.zip' })
Serverless: [AWS s3 200 0.063s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/AdminUpdateOrders.zip' })
Serverless: [AWS s3 200 0.094s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/AdminUpdateInventory.zip' })
Serverless: [AWS s3 200 0.135s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/AdminTweet.zip' })
Serverless: [AWS s3 200 0.113s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/AdminGetReceipt.zip' })
Serverless: [AWS s3 200 0.066s 0 retries] headObject({ Bucket: 'dvsa-ubuntu-serverlessdeploymentbucket-1bb8wjrdkzqn6',
  Key:
   'serverless/dvsa/ubuntu/1621961551042-2021-05-25T16:52:31.042Z/AdminGetOrders.zip' })
Serverless: [AWS lambda 200 0.124s 0 retries] getFunction({ FunctionName: 'DVSA-ORDER-SHIPPING' })
Serverless: [AWS lambda 200 0.134s 0 retries] getFunction({ FunctionName: 'DVSA-ORDER-MANAGER' })
Serverless: [AWS lambda 200 0.084s 0 retries] getFunction({ FunctionName: 'DVSA-ORDER-CANCEL' })
Serverless: [AWS lambda 200 0.091s 0 retries] getFunction({ FunctionName: 'DVSA-ORDER-BILLING' })
Serverless: [AWS lambda 200 0.093s 0 retries] getFunction({ FunctionName: 'DVSA-ORDER-GET' })
Serverless: [AWS lambda 200 0.094s 0 retries] getFunction({ FunctionName: 'DVSA-ORDER-NEW' })
Serverless: [AWS lambda 200 0.086s 0 retries] getFunction({ FunctionName: 'DVSA-ORDER-UPDATE' })
Serverless: [AWS lambda 200 0.091s 0 retries] getFunction({ FunctionName: 'DVSA-ORDER-ORDERS' })
Serverless: [AWS lambda 200 0.079s 0 retries] getFunction({ FunctionName: 'DVSA-CREATE-RECEIPT' })
Serverless: [AWS lambda 200 0.087s 0 retries] getFunction({ FunctionName: 'DVSA-FEEDBACK-UPLOADS' })
Serverless: [AWS lambda 200 0.065s 0 retries] getFunction({ FunctionName: 'DVSA-PAYMENT-PROCESSOR' })
Serverless: [AWS lambda 200 0.084s 0 retries] getFunction({ FunctionName: 'DVSA-GET-CART-TOTAL' })
Serverless: [AWS lambda 200 0.093s 0 retries] getFunction({ FunctionName: 'DVSA-SEND-RECEIPT-EMAIL' })
Serverless: [AWS lambda 200 0.091s 0 retries] getFunction({ FunctionName: 'DVSA-ADMIN-GET-ORDERS' })
Serverless: [AWS lambda 200 0.089s 0 retries] getFunction({ FunctionName: 'DVSA-ADMIN-GET-RECEIPT' })
Serverless: [AWS lambda 200 0.094s 0 retries] getFunction({ FunctionName: 'DVSA-ADMIN-UPDATE-ORDERS' })
Serverless: [AWS lambda 200 0.093s 0 retries] getFunction({ FunctionName: 'DVSA-ADMIN-UPDATE-INVENTORY' })
Serverless: [AWS lambda 200 0.088s 0 retries] getFunction({ FunctionName: 'DVSA-ADMIN-TWEET' })
Serverless: [AWS lambda 200 0.084s 0 retries] getFunction({ FunctionName: 'DVSA-CRON-PROCESSOR' })
Serverless: [AWS lambda 200 0.094s 0 retries] getFunction({ FunctionName: 'DVSA-CRON-ORDER-CLEANER' })
Serverless: [AWS lambda 200 0.093s 0 retries] getFunction({ FunctionName: 'DVSA-CRON-JOB-UPDATE' })
Serverless: [AWS lambda 200 0.094s 0 retries] getFunction({ FunctionName: 'DVSA-USER-ACCOUNT' })
Serverless: [AWS lambda 200 0.093s 0 retries] getFunction({ FunctionName: 'DVSA-USER-PROFILE' })
Serverless: [AWS lambda 200 0.084s 0 retries] getFunction({ FunctionName: 'DVSA-USER-CREATE' })
Serverless: [AWS lambda 200 0.064s 0 retries] getFunction({ FunctionName: 'DVSA-USER-INBOX' })
Serverless: Service files not changed. Skipping deployment...
Serverless: Invoke aws:info
Serverless: [AWS cloudformation 200 0.108s 0 retries] describeStacks({ StackName: 'dvsa-ubuntu' })
Serverless: [AWS cloudformation 200 0.254s 0 retries] listStackResources({ StackName: 'dvsa-ubuntu', NextToken: undefined })
Serverless: [AWS cloudformation 200 0.188s 0 retries] listStackResources({ StackName: 'dvsa-ubuntu',
  NextToken:
   'MhfxBHFrckhNWP7GO92aBO7ixna67BZ26acxqbRZ40iSsBfWO8ERsPXsRVE2gAl9gDlQwIAZNaT8y6Yt+7Q7pPqgjEcmGf2WGZDb3oPv5lEKaznnYln2Gxbm43fSf1QkZ1mwAJkKIaD+CTfrZnHrcbtpQm+CvGdbyHSnNOU5ihZ0e9g4dXqQk5SBWMgovNuD+GflOuwwfcf30vTLhEyRCL2+FXk4K8X/oi5PKeN3ApfsTBkoH/rdns+ukCx64W//ku6eEgtGdMZMLfKxPkSC+yg+wsBhSmoL6EBQu5XAYtly0ayvhhvTBJWI80Gwk7TelD5umWbxZTvQ7xAKFjoPL0cD2FljqEOD4A6MQaJGIJHLvho+8Gvwh4FqjRtKoPqIYI7MeQcxLUn41Mb3Ztcm8Ejip29Tw+/Mzq3uJcosil1UbWZq1WXgUG4j85kHj+XuQFInnDI40Y/3v4VYLJFmhgu7maSSGy/gwkakA1beNf8gOAksY6VO74rNJIgIdT+skg0eWpZeOXp5JgkPtMVlKKaqlgPx/W338xkPZqwwoNFiwxablip/ZXEsRZBBEGt76V6EfC/NLVAvjLBbH1ztLJP97Me91dZRta2e3B8MNNl0Em9oTqVqGIkWEpANoQ5U3LiUs86CKjYqRGkqYG09G/WmRWeivhI7DS0AnCa1V6YXfcm1h56LSQb4ijnyJiqE7z/aAH118OlsSXkYYafIWZC48STwr/PcLtUtobxv/ACDoqspXHlQaN3Rtg9K6i3htAWmwVE+flySioMQIcTwbQ==|IDjlPeoFpab9of1EcK2eYw==|1|d983477e32488aa1c50950f6b3f3bb4b680410505376d3c5b8c6e8f882af9d9b' })
Service Information
service: dvsa
stage: ubuntu
region: us-east-1
stack: dvsa-ubuntu
resources: 104
api keys:
  None
endpoints:
  POST - https://l66j8n1pk4.execute-api.us-east-1.amazonaws.com/ubuntu/order
  POST - https://l66j8n1pk4.execute-api.us-east-1.amazonaws.com/ubuntu/DVSA-PAYMENT-PROCESSOR
  POST - https://l66j8n1pk4.execute-api.us-east-1.amazonaws.com/ubuntu/DVSA-GET-CART-TOTAL
functions:
  OrderManager: DVSA-ORDER-MANAGER
  OrderShipping: DVSA-ORDER-SHIPPING
  OrderBilling: DVSA-ORDER-BILLING
  CancelOrder: DVSA-ORDER-CANCEL
  GetOrder: DVSA-ORDER-GET
  OrderNew: DVSA-ORDER-NEW
  GetOrders: DVSA-ORDER-ORDERS
  OrderUpdate: DVSA-ORDER-UPDATE
  FeedbackUploads: DVSA-FEEDBACK-UPLOADS
  CreateReceipt: DVSA-CREATE-RECEIPT
  PaymentProcessor: DVSA-PAYMENT-PROCESSOR
  GetTotal: DVSA-GET-CART-TOTAL
  SendReceipt: DVSA-SEND-RECEIPT-EMAIL
  AdminGetOrders: DVSA-ADMIN-GET-ORDERS
  AdminGetReceipt: DVSA-ADMIN-GET-RECEIPT
  AdminUpdateOrders: DVSA-ADMIN-UPDATE-ORDERS
  AdminUpdateInventory: DVSA-ADMIN-UPDATE-INVENTORY
  AdminTweet: DVSA-ADMIN-TWEET
  CronProcessor: DVSA-CRON-PROCESSOR
  CronOrderCleaner: DVSA-CRON-ORDER-CLEANER
  CronJobUpdate: DVSA-CRON-JOB-UPDATE
  UserAccount: DVSA-USER-ACCOUNT
  UserProfile: DVSA-USER-PROFILE
  UserCreate: DVSA-USER-CREATE
  UserInbox: DVSA-USER-INBOX
layers:
  None
Serverless: Invoke aws:deploy:finalize
Serverless: WARNING: Inappropriate call of provider.request()

****************************************************************************
Serverless: Update available. Run "npm install serverless@^2.43.1" to update
****************************************************************************

Running command: aws dynamodb batch-write-item --request-items file://backend/serverless/scripts/create-inventory-data.json

An error occurred (ResourceNotFoundException) when calling the BatchWriteItem operation: Requested resource not found

 Error ---------------------------------------------------

  Error: Command failed: aws dynamodb batch-write-item --request-items file://backend/serverless/scripts/create-inventory-data.json
      at checkExecSyncError (child_process.js:629:11)
      at execSync (child_process.js:666:13)
      at Scriptable.runCommand (/home/ubuntu/DVSA/node_modules/serverless-scriptable-plugin/index.js:48:12)
      at Bluebird.each (/home/ubuntu/DVSA/node_modules/serverless-scriptable-plugin/index.js:41:21)
      at tryCatcher (/home/ubuntu/DVSA/node_modules/bluebird/js/release/util.js:16:23)
      at Object.gotValue (/home/ubuntu/DVSA/node_modules/bluebird/js/release/reduce.js:166:18)
      at Object.gotAccum (/home/ubuntu/DVSA/node_modules/bluebird/js/release/reduce.js:155:25)
      at Object.tryCatcher (/home/ubuntu/DVSA/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/home/ubuntu/DVSA/node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (/home/ubuntu/DVSA/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromiseCtx (/home/ubuntu/DVSA/node_modules/bluebird/js/release/promise.js:641:10)
      at _drainQueueStep (/home/ubuntu/DVSA/node_modules/bluebird/js/release/async.js:97:12)
      at _drainQueue (/home/ubuntu/DVSA/node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (/home/ubuntu/DVSA/node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (/home/ubuntu/DVSA/node_modules/bluebird/js/release/async.js:15:14)
      at runCallback (timers.js:705:18)
      at tryOnImmediate (timers.js:676:5)
      at processImmediate (timers.js:658:5)
      at process.topLevelDomainCallback (domain.js:126:23)

  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com

  Your Environment Information ---------------------------
     Operating System:          linux
     Node Version:              10.19.0
     Framework Version:         2.43.1 (local)
     Plugin Version:            5.1.3
     SDK Version:               4.2.2
     Components Version:        3.10.0

Serverless: [AWS cloudformation 200 0.645s 0 retries] describeStacks({ StackName: 'dvsa-ubuntu' })
Serverless: Stack Output saved to file: ./client/src/be-stack.json
pgrzesik commented 3 years ago

What README.md are you following? The aws dynamodb batch-write-item --request-items file://backend/serverless/scripts/create-inventory-data.json command that is failing is run as a hook thanks to use of serverless-scriptable-plugin. As for the question about table creation - this is specific to your application and in the shared configuration it looks like the config for database is imported from another configuration file which is not shared here.

Based on your config, I'm guessing you're setting up https://github.com/OWASP/DVSA, correct? If that is the case, please report at their repository because it looks like an issue with configuration and not with with the Framework itself.

senorblackbean commented 3 years ago

Sorry, this is the wrong repo. Nevermind

pgrzesik commented 3 years ago

Thanks for clearing this up :bow: