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

Setting up API Gateway

In this section, we will start with extending our CloudFormation template.

First of all, we should start with some boilerplate. In the previous chapter, we had mentioned CloudWatch Logs, the service that AWS provides to store logs in a central place. API Gateway also uses CloudWatch to store HTTP logs and, like all services that try to access to other services, needs an IAM role. In this IAM role, we should give access to the apigateway.amazonaws.com service to access the CloudWatch logs and deliver this role to API Gateway as the AWS::ApiGateway::Account resource. Now let's open our CloudFormation template and just prepend these lines to the Resources section:

"ApiGatewayCloudwatchRole": { 
      "Type": "AWS::IAM::Role", 
      "Properties": { 
        "AssumeRolePolicyDocument": { 
          &quot...
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 $19.99/month. Cancel anytime