When applying a Resource Policy to a Lambda Function for a Function URL to be publicly accessible you must also configure the Function to enable and allow Public Access Policy on it.
It's currently not possible to apply this via Terraform, so when adding a Resource Policy to a function, the apply fails as the Function is blocked from being made publicly available.
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Description
When applying a Resource Policy to a Lambda Function for a Function URL to be publicly accessible you must also configure the Function to enable and allow Public Access Policy on it.
It's currently not possible to apply this via Terraform, so when adding a Resource Policy to a function, the apply fails as the Function is blocked from being made publicly available.
Example policy:
Affected Resource(s) and/or Data Source(s)
Potential Terraform Configuration
References
Function URL Auth docs Public Access Docs Public Access API Spec
Would you like to implement a fix?
Yes