Hi all, I have a problem with Pulumi and AWS Lambd...
# general
s
Hi all, I have a problem with Pulumi and AWS Lambda destinations. Let me demonstrate it via a small example.
Copy code
import pulumi
import pulumi_aws as aws

service_function = aws.lambda_.Function(
    "lambda-service",
    runtime="python3.9",
    handler="handler.handler",
    memory_size=384,
    timeout=5,
    code=pulumi.FileArchive("/path/to/code"),
)

function_on_success = aws.lambda_.Function(
    "function_on_success",
    runtime="python3.9",
    handler="handler.handler",
    memory_size=384,
    timeout=5,
    code=pulumi.FileArchive("/path/to/code"),
)

success_destination = aws.lambda_.FunctionEventInvokeConfig(
    "success_destination",
    function_name=service_function.name,
    destination_config=aws.lambda_.FunctionEventInvokeConfigDestinationConfigArgs(
        on_success=aws.lambda_.FunctionEventInvokeConfigDestinationConfigOnSuccessArgs(
            destination=function_on_success.arn
        ),
    ),
)

pulumi.export("function-name", service_function.name)
I am using Localstack to test it locally and I would have expected that
Copy code
awslocal lambda list-function-event-invoke-configs --function-name function-name
would show me the created destination. However, I get a 404 error since there seems to be not destaination. Also testing the functionality shows that there is no destination that has been createt (I tried it by invoking the first Lambda via SQS from the CLI). I think it might be a Localstack problem, since also putting it through the CLI does not work. Does anyone have similar issues and/or know a solution? If more details are necessary, please tell me and I will provide them. Of course this minimal example is actually part of a larger project. EDIT: I thought it put-function-event-invoke-config via CLI worked but now I see that it does not. I suspect this is rather a Localstack problem.
b
yes seems like a local stack problem, tbis works fine for against the aws api