Skip to content

Instantly share code, notes, and snippets.

@chrismckinnel
Created June 12, 2019 09:19
Show Gist options
  • Save chrismckinnel/1934fb8762d471e34645aba49bce9b00 to your computer and use it in GitHub Desktop.
Save chrismckinnel/1934fb8762d471e34645aba49bce9b00 to your computer and use it in GitHub Desktop.
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Full stack to demo Lambda@Edge for CloudFront redirects
Parameters:
RedirectLambdaName:
Type: String
Default: redirect-lambda
Resources:
RedirectLambdaFunctionRole:
Type: AWS::IAM::Role
Properties:
AssumeRolePolicyDocument:
Version: '2012-10-17'
Statement:
- Effect: Allow
Principal:
Service:
- 'lambda.amazonaws.com'
- 'edgelambda.amazonaws.com'
Action:
- 'sts:AssumeRole'
ManagedPolicyArns:
- 'arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment