Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Serverless Architectures

You're reading from   Building Serverless Architectures Unleash the power of AWS Lambdas for your applications

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781787129191
Length 242 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Cagatay Gurturk Cagatay Gurturk
Author Profile Icon Cagatay Gurturk
Cagatay Gurturk
Arrow right icon
View More author details
Toc

Configuring Guice

To configure Guice, we must first add it as a dependency. We will add the Guice dependency independently to AWS Lambda functions, but it is also a good idea to have version information somewhere in the main project. That's why we export the guiceVersion variable from the parent project's build.gradle file first:

ext { 
  guiceVersion = '4.1.+' 
} 

Now we can add Guice's dependency to the lambda-authorizer module's dependencies. Here, we did not create any build.gradle file, so let's create it first:

    $ touch lambda-authorizer/build.gradle 

The, let's add the following content:

dependencies { 
  compile group: 'com.google.inject', name: 'guice', version: guiceVersion
}

At this step, it is also convenient to add the services-user project as a dependency to this Lambda function. So, we can add also...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £16.99/month. Cancel anytime