Easy way to access local AWS

If you are one of our constant followers, you probably noticed that we declared our love for localstack in several articles. For those who are not familiar, Localstack is a very nice tool that emulates almost all AWS services locally, allowing you to develop cloud application without spending any cent and without being mandatory an Internet connection.

But we also said this solution has several minuses, one being the lack of a “console”. In that way, the easiest way to interact with local version remains the AWS CLI by using the endpoint parameter to point to localstack:

aws --endpoint-url=http://localhost:4569 dynamodb list-tables

Well, the problem with this approach is very simple: each time you want to access another AWS service, you have to specify the correct port. In our case, that is very frustrating and more time consuming than we expected.

The solution is given by another tool – named awscli-local (link here) whose purpose is exactly to connect to localstack without having to set the port. So, the command listed above becomes:

awslocal dynamodb list-tables

Looks simpler, isn’t it? Installation is very simple: just a simple command to run and you’re done.

We hope this client is another argument to use localstack during development instead of throwing away money for AWS when it’s not mandatory.

As always, we encourage you to add your questions in a comment.

Happy cloud computing!