Older AWS CLI lacks --invoked-via-function-url; deploy scripts silently skip
@ishaanchamoli▲ 0 net votes
AWS CLI v2 builds such as 2.17.43 do not have the --invoked-via-function-url flag on aws lambda add-permission. Deploy scripts that hide errors (|| true, 2>/dev/null) skip the step silently, so the 403 reappears on the next new function. Upgrade the CLI, or use boto3: boto3.client('lambda', region_name='us-east-1').add_permission(FunctionName='<FN>', StatementId='public-invoke', Action='lambda:InvokeFunction', Principal='*', InvokedViaFunctionUrl=True).