Ends in
00
hrs
00
mins
00
secs
ENROLL NOW

⏳ 20% OFF All Video Courses as low as $7.99 each only – Limited Offer Only

Achieve AWS Mastery with LocalStack

Home » Others » Achieve AWS Mastery with LocalStack

Achieve AWS Mastery with LocalStack

Imagine if there is a way to learn AWS without ever needing an internet connection, learn to test your infrastructure locally, run AWS services on your machine? Well, there’s this thing called LocalStack in which allows you to run AWS in your machine. You can test out different services, learn how to connect each of it, test out how they can work together, and maybe testing out an application that uses a specific service that you cannot test locally. In this blog, I will guide you through on how to set it up and the things that you can do with it from helping you to master AWS to testing your AWS infrastructure locally.

 

AWS LOCALSTACK Demo

What is LocalStack Anyway?

In short, LocalStack is a powerful open-source cloud service emulator that runs entirely within a single Docker Container.

For clarity, it is not a “mock” server that simply emulates basic API calls. LocalStack provides a high-fidelity emulation of the AWS APIs. This means the code you write and the configurations you test locally will behave predictably when deployed to a real AWS environment.

LocalStack gives you an isolated, risk-free environment to master three critical areas of AWS development:

  • Service Integration: Learn exactly how services such as S3, SQS, SNS, Lambda, and many more interact in a complex application flow.
  • Rapid Iteration: Stop waiting minutes for deployments. Test code changes instantly and dramatically speed up your development and debugging cycles.
  • Hands-On Mastery: Experiment without fear. Build, break, and rebuild complex architectures as many times as you need without incurring a single cloud bill or risking production data. 

Let’s Set It Up!

Getting your local AWS sandbox running is straightforward it just requires you to install the LocalStack CLI, AWS CLI, and Docker running.

Installation

For Mac users, you can simply install it using homebrew

brew install localstack/tap/localstack-cli 

For Non-Mac users, you can install it using pip

python3 -m pip install --upgrade localstack

Alternatively, you can check here how to install it natively in your os here.

Tutorials dojo strip

To check if it is already installed, try running localstack --version in your terminal.

Starting It Up

Before you proceed running any commands, make sure that your Docker is already running.

Run localstack start -d this will setup the docker container and start it in detach mode. Basically bootsrap a docker instance in your machine.

AWS LOCALSTACK DEMO A

Check AWS Services that you can experiment with by running localstack status services

AWS LOCALSTACK DEMO B

Configure AWS CLI

To check if you have AWS CLI installed simply run aws --version

Next, setup an AWS Profile. Simply run this to set a profile

aws configure --profile=localstack

This command will then ask you to input AWS Credentials but no need to worry as you can just put test value for AWS_ACCESS_KEY and AWS_SECRET_ACCESS_KEY and make sure to provide a valid AWS_REGION like us-east-1 and you can format the output to json or the default.

AWS LOCALSTACK DEMO C

Lasty, before moving forward you need to set the endpoint url in your aws config file to have the http://localhost:4566

AWS LOCALSTACK DEMO D

To use this newly created AWS Profile simply run 

export AWS_PROFILE=localstack

this will be then set as your profile in your terminal session.

Let’s Create an Amazon S3 Bucket and Upload A File

To create a S3 Bucket you can run aws s3 mb s3://test-bucket. mb stands for make_bucket. Afterwards, you can check the buckets you have by running aws s3 ls

AWS LOCALSTACK DEMO E

Create a test file that we are going to upload in our S3 Bucket.

AWS LOCALSTACK DEMO F

To upload the file we can run the command

aws s3 cp message.txt s3://test-bucket cp is copy and will copy the file to the s3 bucket.

AWS LOCALSTACK DEMO H

To check the contents of the S3 Bucket run aws s3 ls s3://test-bucket and to download the file you just uploaded simply run the command from before but reverse the order so that it knows that you will copy the file from the s3 bucket to your local.

AWS LOCALSTACK DEMO H

Conclusion

LocalStack is more than just a testing tool. it’s the definitive sandbox for achieving AWS mastery. It removes the barriers of slow iteration and risk, giving you the freedom to build, break, and master core AWS services like S3 at lightning speed.

⏳ 20% OFF All Video Courses as low as $7.99 each only – Limited Offer Only

Tutorials Dojo portal

Learn AWS with our PlayCloud Hands-On Labs

🧑‍💻 CodeQuest – AI-Powered Programming Labs

FREE AI and AWS Digital Courses

Tutorials Dojo Exam Study Guide eBooks

tutorials dojo study guide eBook

FREE AWS, Azure, GCP Practice Test Samplers

Subscribe to our YouTube Channel

Tutorials Dojo YouTube Channel

Join Data Engineering Pilipinas – Connect, Learn, and Grow!

Data-Engineering-PH

Ready to take the first step towards your dream career?

Dash2Career

K8SUG

Follow Us On Linkedin

Recent Posts

Written by: Rafael Miguel

Rafael Louie Miguel, also known as Kuya Egg, is an AWS Certified Cloud Practitioner and Certified Solutions Architect Associate. An intern at Tutorials Dojo. He serves as the Director of Technology at AWS Cloud Club PUP, the first AWS Cloud Club in the Philippines. He is an undergraduate at the Polytechnic University of the Philippines currently pursuing a Bachelor’s degree in Information Technology.

AWS, Azure, and GCP Certifications are consistently among the top-paying IT certifications in the world, considering that most companies have now shifted to the cloud. Earn over $150,000 per year with an AWS, Azure, or GCP certification!

Follow us on LinkedIn, YouTube, Facebook, or join our Slack study group. More importantly, answer as many practice exams as you can to help increase your chances of passing your certification exams on your first try!

View Our AWS, Azure, and GCP Exam Reviewers Check out our FREE courses

Our Community

~98%
passing rate
Around 95-98% of our students pass the AWS Certification exams after training with our courses.
200k+
students
Over 200k enrollees choose Tutorials Dojo in preparing for their AWS Certification exams.
~4.8
ratings
Our courses are highly rated by our enrollees from all over the world.

What our students say about us?