data "aws_partition" "current" {} data "aws_region" "current" {} data "aws_caller_identity" "current" {} data "archive_file" "lambda_my_function" { type = "zip" source_file = "../src/lambda-cloudfront.py" output_file_mode = "0666" output_path = "${path.module}/files/cloudfront.zip" } resource "aws_iam_role" "cloudfront-role" { name = "cloudfront-lambda-role" assume_role_policy = <