Yossale
Yossale

Reputation: 14361

Add Trust Relationship to Lambda Role using Cloudformation

I'm generating a static website and a lambda on AWS using CloudFormation. The Lambda function is going to be an @Edge lambda, but in order to register it as an Edge lambda, I need the lambda to have a Trust Relationship with "edgelambda.amazonaws.com".

How do I add this trust relationship to my newly created Lambda within the CloudFormation template?

Upvotes: 0

Views: 1034

Answers (1)

lexicore
lexicore

Reputation: 43689

Something along the lines:

  AssumeRolePolicyDocument:
    Version: 2012-10-17
    Statement:
      - Effect: Allow
        Principal:
          Service:
            - edgelambda.amazonaws.com
        Action:
          - 'sts:AssumeRole'

Upvotes: 2

Related Questions