AWS CDK Localstack error: "Unable to connect to AWS: The security token included in this request is invalid."

37 Views Asked by At

Note: this is not a duplicate of Localstack throws The security token included in the request is invalid. I've already studied that question and it doesn't quite apply to my situation.

I have an AWS Serverless (SAM) Lambda-based application written in C# on .NET 6 in Visual Studio, utilizing the AWS Power tools. The solution includes CDK code as well.

I've pulled a Docker image of Localstack and installed the aws-cdk-local package. I've also edited the aws credentials file as follows:

[localstack]
aws_access_key_id=local
aws_secret_access_key=local
ignore_configured_endpoint_urls=false
toolkit_artifact_guid=3febc08a-8734-42f5-b259-19f79c2d0136
region=us-east-1

In Visual Studio's AWS Explorer, when I select the [localstack] profile, I see this error: Unable to connect to AWS: The security token included in this request is invalid.

enter image description here

Even if I click Edit Account and enter the Access Key ID and Secret Access Key exactly as specified in my credentials file...

enter image description here

...it still gives the same error after I click Retry.

Any suggestions?

0

There are 0 best solutions below