Terraform + localstack : Cloudwatch logs Error: UnrecognizedClientException: The security token included in the request is invalid.

Remy NTSHAYKOLO
Jan 24, 2021

--

Problem resolution:

In your terraform providers aws block add in the endpoints :

cloudwatchlogs:”http://127.0.0.1:4566" or cloudwatchlogs:”http://localhost:4566"

And no cloudwatch:”http://127.0.0.1:4566" is not enough

Source of the problem

By not providing the local endpoint for cloudwatchlogs, terraform will try to interact with the real cloudwatchlogs service. As you furnished fake credentials, it failed.

--

--