Home > Blockchain >  Deploy AWS Lambda with function URL via Cloudformation
Deploy AWS Lambda with function URL via Cloudformation

Time:04-10

Since a few days, enter image description here

This is what I see when pushing the “Edit” button:

enter image description here

After clicking “Save”, I get the following (note the blue box):

enter image description here

Also, when I go into “Edit” mode again, I now see the following:

enter image description here

After that, the function can be accessed via its URL.

I tried to add the policy into my CFN stack, either standalone as AWS::IAM::Policy, but then it is not a resource-based policy or as an additional action on the lambdaRole. But in either case, I can’t add a Principal and the policy doesn’t have an effect.

Does anybody know how I can make a pure Clouformation deployment for a Lambda with a function URL? Or is this a bug in Cloudformation and/or Lambda?

CodePudding user response:

Your template is missing AWS::Lambda::Permission, thus its does not work. You already know what the permissions should be based on AWS console inspection, so you have to recreate those permissions using AWS::Lambda::Permission. This allows you to specify FunctionUrlAuthType.

  • Related