简体   繁体   中英

how to solve “An error occurred (InvalidClientTokenId)” AWS Chalice deployment error

I'm new to application development and decided to use AWS services for this project. however, I am having difficulty deploying chalice. every time I run "chalice deploy", I get an error.

here are the steps I followed along with commands for Windows:

  1. upgraded my powershell
  2. "virtualenv enve" : then ".\venv\Scripts\activate" # install and run virtual environment
  3. "pip install aws cli ": # install aws command line interface
  4. "aws configure" : # configure my AWS_KEY and AWS_SCERET
  5. "pip install chalice" : # install chalice
  6. "chalice new-project" : # created a new project
  7. "chalice deploy" # deploy

I get

An error occurred (InvalidClientTokenId) when calling the GetRole operation: The security token included in the request is invalid.

I'm able to use localhost and run my application but not able to deploy to the server. I don't know what i'm doing wrong. someone, please help!

additional info: my operating system is windows 10. I upgraded my PowerShell to 7

I somehow figured it out.. The error occurred because the command "

chalice deploy

" was used in the wrong directory. Make sure you are in the directory where your chalice file is before initializing it to deploy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM