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

Deploying our first Lambda with CloudFormation

In this section, we will create our first template and deploy the stack using our Gradle script. We can start writing our template by creating a text file named cloudformation.template in the root directory of our project:

    $ cd ~/serverlessbook
    $ touch cloudformation.template
  

In this section, we will be defining three CloudFormation resources:

  • The IAM role
  • A custom IAM policy to be attached to the role created earlier
  • A Lambda function

For the first resource, we can start with IAM Role, which our Lambda function will use for execution. In the first chapter, we briefly looked at what an IAM Role is. Let's assume that our Lambda function will access S3 buckets in our accounts. How we can allow our Lambda function to access S3 buckets as read-only but prevent it from writing to buckets? These permissions are configured...

You have been reading a chapter from
Building Serverless Architectures
Published in: Jul 2017
Publisher: Packt
ISBN-13: 9781787129191
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 $19.99/month. Cancel anytime