flock-lab / flock

Flock: A Low-Cost Streaming Query Engine on FaaS Platforms

Home Page:https://flock-lab.github.io/flock/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rusoto and Lambda are incompatible

gangliao opened this issue · comments

Describe the bug

Rusoto rusoto/rusoto#1651 is no longer maintained. This week we discovered that the invoke() function call will trigger Lambda to report an error.

Playground with the following options: 
PlaygroundOpt { ops_type: "scatter_gather_ops", events: 1, concurrency: 1 }
FunctionConfiguration { code_sha_256: Some("hmeMoQgVDiRrwByw5XXZPaJtPXiGAC5N1B1Ugax/zes="), 
code_size: Some(1699478), dead_letter_config: None, description: Some(""), environment: None, 
file_system_configs: None, function_arn: Some("arn:aws:lambda:us-east-1:942368842860:function:flock_pg_scatter"), 
function_name: Some("flock_pg_scatter"), handler: Some("handler"), image_config_response: None, kms_key_arn: None, 
last_modified: Some("2021-11-30T20:35:46.341+0000"), last_update_status: None, last_update_status_reason: None, 
last_update_status_reason_code: None, layers: None, master_arn: None, memory_size: Some(128), package_type: Some("Zip"),
 revision_id: Some("4561f1a1-579d-4b2f-bc11-a254838fea94"), role: Some("arn:aws:iam::942368842860:role/flock"), 
runtime: Some("provided.al2"), signing_job_arn: None, signing_profile_version_arn: None, state: Some("Pending"), 
state_reason: Some("The function is being created."), state_reason_code: Some("Creating"), timeout: Some(3), 
tracing_config: Some(TracingConfigResponse { mode: Some("PassThrough") }), version: Some("$LATEST"), vpc_config: None }
Error: Execution("Lambda function execution failure: The operation cannot be performed at this time. 
The function is currently in the following state: Pending")

Rusoto's invoke() will always assume that the lambda function is pending, which makes our project unable to continue. I use the AWS CLI to directly call the invoke() without any problems. Therefore, we must immediately abandon the Rusoto dependency library.

Let's try to use the official AWS SDK for Rust https://github.com/awslabs/aws-sdk-rust.

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

This is related to the 'delete_function()' issue. We may replace 'update_function_code()' for it.