0

I was following this guide:

https://aws.amazon.com/getting-started/hands-on/serve-a-flask-app/

I installed everything and got to this section 4:

$ aws lightsail create-container-service --service-name flask-service \ --power small --scale 1

I got an error, but removed the slash:

$ aws lightsail create-container-service --service-name flask-service --power small --scale 1

Then I got:

You must specify a region. You can also configure your region by running "aws configure".
PS C:\Data\programming\lightsail-containers-flask> aws configure
AWS Access Key ID [None]:
AWS Secret Access Key [None]:
Default region name [None]:
Default output format [None]:
PS C:\Data\programming\lightsail-containers-flask> aws lightsail create-container-service --service-name flask-service --power small --scale 1

You must specify a region. You can also configure your region by running "aws configure".`

I then ran configure:

PS C:\Data\programming\lightsail-containers-flask> $Env:AWS_ACCESS_KEY_ID="HKDSFJKSJDHEXAMPLE"
PS C:\Data\programming\lightsail-containers-flask> $Env:AWS_SECRET_ACCESS_KEY="HJLhjk678HJK7/ljknioi/hjkytEXAMPLE"
PS C:\Data\programming\lightsail-containers-flask> $Env:AWS_DEFAULT_REGION="us-west-2"`

then running again:

$ aws lightsail create-container-service --service-name flask-service --power small --scale 1``

gives me:

An error occurred (UnrecognizedClientException) when calling the CreateContainerService operation: The security token included in the request is invalid.`

Is there any way for me to solve this or create a docker container service to upload a flask app? I have searched around and can't find an answer, although I'm sure there is one. This is my first time using stack overflow so my apologies for any errors is etiquette or formatting.

meowludo
  • 1
  • 2

0 Answers0