0

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?

Yossale
  • 14,165
  • 22
  • 82
  • 109

1 Answers1

2

Something along the lines:

  AssumeRolePolicyDocument:
    Version: 2012-10-17
    Statement:
      - Effect: Allow
        Principal:
          Service:
            - edgelambda.amazonaws.com
        Action:
          - 'sts:AssumeRole'
lexicore
  • 42,748
  • 17
  • 132
  • 221