umbrellerde / functionfusion

Function Fusion in AWS Lambda
4 stars 0 forks source link

Got {"message":"Missing Authentication Token" Error When Running Test #1

Open GitHubDiom opened 19 hours ago

GitHubDiom commented 19 hours ago

Dear Authors,

I greatly appreciate your efforts on this insightful work!

I am trying to run the test, and while deploying functions and S3 buckets went smoothly, I encountered an issue when invoking the API Gateway. Specifically, when I use the following curl command:

curl -X POST https://[baseUrlFromTerraform].execute-api.eu-central-1.amazonaws.com/onlyStage/SYNC-A -H 'Content-Type: application/json' -d '{"sync": true}'

I receive the error: {"message":"Missing Authentication Token"}.

I am new to the AWS Lambda platform and would greatly appreciate any guidance on resolving this issue.

Thank you so much for your help!

Best regards

umbrellerde commented 18 hours ago

Hi,

thanks for your interest in Fusionize! I have finally gotten around to updating the main branch to point to the updated version of the source code that was used in the extended version of the paper, sorry for the delay.

Regarding your error, this usually happens when the Base URL from API Gateway is not correct. To me, this happened sometimes when I was not copying the output from terraform correctly. Another reason might be that the code has an implicit assumption that there is only one API Gateway deployed in your account, which it will use (unfortunately I did not find an easy way around this). If you have more than one API Gateway deployed you could test manually deleting the other ones or setting the correct URL manually.

Greetings

umbrellerde commented 18 hours ago

🤦 nvm I fixed it. The default use case was the IoT use case, which does not have "A" as task. I changed the default use case to "split", so now your call should work.

GitHubDiom commented 18 hours ago

Thanks for the updating, however, now I got a new error.

command terraform apply -auto-approve got the following error. Is this new version works fine in your env?

...
â•·
│ Error: a number is required
│ 
│   with aws_api_gateway_rest_api.api,
│   on main.tf line 139, in resource "aws_api_gateway_rest_api" "api":
│  139: resource "aws_api_gateway_rest_api" "api" {
│ 
╵
â•·
│ Error: Error in function call
│ 
│   on fusionfunction/main.tf line 114, in resource "aws_s3_object" "lambda_fusion_manager":
│  114:   etag   = filemd5(data.archive_file.source_code_archive.output_path)
│     ├────────────────
│     │ while calling filemd5(path)
│     │ data.archive_file.source_code_archive.output_path is "./deployment_artifacts/function.zip"
│ 
│ Call to function "filemd5" failed: open deployment_artifacts/function.zip: no such file or directory.
umbrellerde commented 15 hours ago

Hi, thanks for catching this, I updated the main branch. I commited my zip files, they will be overridden by the zips created by your terraform. It worked for me since my env already has zip files from older runs :)