FunctionUrl does not exist
Mon May 02 2022
I recently came across the “FunctionUrl does not exist” error while getting started with Lambda Function URL’s and CloudFormation.
Requested attribute FunctionUrl does not exist in schema for AWS::Lambda::Function
The Lambda function was configured correctly to setup the function URL.
MyLambdaFunction: Type: AWS::Serverless::Function Properties: FunctionUrlConfig: AuthType: NONE
The CloudFormation output appeared to be configured correctly based on the CloudFormation documentation.
MyLambdaFunctionEndpoint: Description: My Lambda Function Endpoint Value: Fn::GetAtt: MyLambdaFunction.FunctionUrl
After staring at the CloudFormation template and documentation for way too long I finally realised that the documentation was adding the
Url suffix to the original resource name. Changing the resource the
GetAtt was referencing from
MyLambdaFunctionUrl worked and everything deployed correctly.
MyLambdaFunctionEndpoint: Description: My Lambda Function Endpoint Value: Fn::GetAtt: MyLambdaFunctionUrl.FunctionUrl
Want to learn more about serverless applications and devops with AWS?
Sign up for our newsletter.