<The pulumi article> on Lambda Function URL doesn’...
# aws
The pulumi article on Lambda Function URL doesn’t contain a working example. I can’t call the URL that is created because the Lambda is lacking a critical permission (
) and I don’t know how to add it because I don’t know how to add the necessary condition using the classic
resource. Any help?
Copy code
new aws.lambda.Permission('hello', {
    action: 'lambda:InvokeFunctionUrl',
    principal: '*',
    function: <ze-function>,
this is lacking a condition
Copy code
new lambda.Permission(`lambda-permission`, {
  action: 'lambda:InvokeFunction',
  function: lambdaFunction.arn,
  principal: '*',
  sourceArn: resource.arn,
we utilize lambda permissions, this is an example of one of ours
looks like you’re just missing the sourceArn of whatever you want to trigger the lambda?
I don’t have a sourceArn 🙂
lambda function URL provides an URL that you can call with HTTP
and I need a way to add that
Copy code
 "StringEquals": {
  "lambda:FunctionUrlAuthType": "NONE"
to the permission
I would probably add this manually in the UI, then use the
pulumi import
command to pull the resource in and generate the code for me to create it, sorry i haven’t personally done lambda url perms before
Yes I can’t import the permission, because I really think that pulumi is not equipped to handle that
* Error unmarshalling Lambda policy: json: cannot unmarshal string into Go struct field PolicyStatement.Statement.Principal of type map[string]string
hmm, im not sure then, each time i’ve been unsure on how to do something the import has worked a treat for me
im using the typescript implementation