2021 Bookmatter SpringBootWithReactAndAWS
2021 Bookmatter SpringBootWithReactAndAWS
Ravi Kant Soni
Namrata Soni
Spring Boot with React and AWS: Learn to Deploy a Full Stack Spring Boot
React Application to AWS
Ravi Kant Soni Namrata Soni
s/o – Late. Ras Bihari Prasad, Sri Niwash, d/o – Late. Ras Bihari Prasad, Sri Niwash,
Lashkariganj, Sasaram, Bihar, India Lashkariganj, Sasaram, Bihar, India
To my beloved mother,
Smt. Manorma Devi
We love you, Maa. We could never have completed this
book without your true love, warmest support, and
constant encouragement.
Table of Contents
About the Authors��������������������������������������������������������������������������������ix
Chapter 1: A
n Introduction to Amazon Web Services (AWS)����������������1
Introduction to Amazon Web Services������������������������������������������������������������������2
AWS Key Services�������������������������������������������������������������������������������������������������4
Elastic Cloud Compute (EC2)���������������������������������������������������������������������������5
Elastic Beanstalk���������������������������������������������������������������������������������������������7
Relational Database Service (RDS)������������������������������������������������������������������8
Route 53����������������������������������������������������������������������������������������������������������8
Use Case: AWS Application Architecture���������������������������������������������������������������9
Create a Free AWS Account for Developer������������������������������������������������������������9
Explore and Create an AWS Elastic Beanstalk Server�����������������������������������������19
Create a HelloWorld JSP Application, Build WAR with Maven,
and Upload WAR to Elastic Beanstalk�����������������������������������������������������������������26
Create a HelloWorld JSP Application�������������������������������������������������������������26
Package a WAR File Using Maven�����������������������������������������������������������������32
Upload WAR to Elastic Beanstalk�������������������������������������������������������������������34
Summary������������������������������������������������������������������������������������������������������������40
v
Table of Contents
Chapter 3: D
eploy MySQL as a Database in AWS with RDS����������������77
Introduction to Amazon RDS (Amazon Relational Database Service)�����������������78
Create an Instance of the RDS Database in AWS������������������������������������������������78
Configure Amazon RDS���������������������������������������������������������������������������������������86
Step 1. Configure Security for Inbound Connection Rules�����������������������������88
Step 2. Test an Amazon RDS Database Instance Connection with
MySQL Workbench����������������������������������������������������������������������������������������91
vi
Table of Contents
vii
Table of Contents
Index�������������������������������������������������������������������������������������������������219
viii
About the Authors
Ravi Kant Soni is a principal full stack
engineer with more than 11 years of IT
experience. He is also an AWS Certified
Solutions Architect. Ravi has experience
in software development, software
design, systems architecture, application
programming, and automation testing. He has
a bachelor’s degree in Information Science and
Engineering from Reva University, Bangalore;
and schooling from Bal Vikash Vidyalaya, Sasaram, and Bihar (India).
He is the author of Build Microservices with Spring Cloud and Spring
Boot (codered eccouncil, 2021), Full Stack AngularJS for Java Developers
(Apress, 2018), Spring: Developing Java Applications for the Enterprise
(Packt, 2017), and Learning Spring Application Development (Packt,
2015). He is also an esteemed member of the Board of Studies at the REVA
University School of Computing and Information Technology in Bangalore.
Contact Ravi at www.linkedin.com/in/november03ravikantsoni/.
ix
About the Authors
x
About the Technical Reviewer
Karunesh Chandra Tiwari is an IT professional
with ten years of experience and has worked
across distinct technologies and domains. He is
a technologist and speaker and loves to provide
his views on articles and blogs.
Karunesh is a BTech IT graduate from
Anna University. He worked as a full stack
developer for the first half of his career and
currently works with BPM and CRM tools
and cloud-related technologies, including
developing and working with applications for
some of the world’s leading banks. He is a very focused and determined
person and loves to learn, work in new technologies. He loves to mentor
people both from a professional and a personal perspective.
Karunesh enjoys working with new technologies and loves to
mentor people. Check out his LinkedIn profile at www.linkedin.com/in/
karunesh-chandra-tiwari-20b9a82a/.
xi
Acknowledgments
Writing a technical book involves fathomless research, review, and
support. I wrote this book, but it wouldn’t have been possible without the
love and support of many people. I truly want to thank everyone listed
here, from the deep bottom of my heart!
First and foremost, I need to express gratitude toward Michael Gorriz,
Group Chief Information Officer, Standard Chartered Bank, for inspiring
me and giving me the confidence to write this book when I anticipated my
career break. All I can offer in return is a heartfelt thank you!
I want to thank my colleagues at Standard Chartered Bank. I learn
something new every day and enjoy a camaraderie I've never felt in any
company before. I am fortunate enough to work with such an experienced
team that helped me enhance my skills. My gratitude goes to Anshu
Sharma Raja, CIO, Consumer Private Business Banking at Standard
Chartered Bank, and Dr. Ashish Chandra, Location Head- aXess Labs
(Banking Innovation) at Standard Chartered Bank; for their guidance and
strong support.
I want to thank the Apress publishing team for the utmost
professionalism. The one individual who has been the roof of this shelter
is Divya Modi, coordinating editor, for supporting me in the writing of this
book. Also, I would like to express my special gratitude to James Markham,
development editor, whose vision, commitment, and persistent efforts
made publishing this book efficient.
My heartfelt thanks go to the technical reviewer, Karunesh Chandra
Tiwari, for his valuable input.
xiii
Acknowledgments
xiv