Resources: Lambda: Type: AWS::Lambda::Function Properties: Code: ./index.js Handler: index.handler Role: !GetAtt Role.Arn Runtime: nodejs16.x Role: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: '2012-10-17' Statement: - Effect: Allow Action: sts:AssumeRole Principal: Service: lambda.amazonaws.com ManagedPolicyArns: - arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole