aws-cli-tools / chaos-lambda-extension

The lambda-chaos-extension allows you to inject faults into Lambda functions without modifying the function code.
Apache License 2.0
27 stars 0 forks source link

Response Change not working for latest versions of US regions #14

Open sujin-sam opened 7 months ago

sujin-sam commented 7 months ago

I'm using a lambda function with the below configs arch: x86_64 runtime: python3.10

I tested the chaos extension in us-east-1 and us-east-2, the Latency attack is working fine, but the Response Body Change is not working

US-East1 ARN: arn:aws:lambda:us-east-1:871265522301:layer:chaos-lambda-extension-x86_64-unknown-linux-gnu-release:12 US-East2 ARN: arn:aws:lambda:us-east-2:871265522301:layer:chaos-lambda-extension-x86_64-unknown-linux-gnu-release:11

Enabled DEBUG logs, did not see any errors. Unfortunately, I cannot be able to upload the logs, as those are in my organization's function.

The below env variables were added for the attacks:

Latency Attack

AWS_LAMBDA_EXEC_WRAPPER=/opt/bootstrap
CHAOS_EXTENSION__LAMBDA__ENABLE_LATENCY=true
CHAOS_EXTENSION__LAMBDA__LATENCY_VALUE=5
CHAOS_EXTENSION__RESPONSE__ENABLE_CHANGE_RESPONSE_BODY=false
RUST_LOG=DEBUG

Response Change Attack

AWS_LAMBDA_EXEC_WRAPPER=/opt/bootstrap
CHAOS_EXTENSION__LAMBDA__ENABLE_LATENCY=false
CHAOS_EXTENSION__LAMBDA__LATENCY_VALUE=5
CHAOS_EXTENSION__RESPONSE__ENABLE_CHANGE_RESPONSE_BODY=true
RUST_LOG=DEBUG
having-fun-serverless commented 5 months ago

Sorry for the late reply. I'm taking a look

SodaDev commented 4 months ago

Extension is not working for me as well and logs are showing nothing. I was playing with different values and trying to check code of the extension. It's not working with provided.al2 for 100%.

Lawouach commented 3 months ago

Just wanted to confirm the issue with the arn:aws:lambda:eu-central-1:871265522301:layer:chaos-lambda-extension-x86_64-unknown-linux-gnu-release:9 layer as well. I'm trying to integrate it into the Chaos Toolkit AWS extension. The latency fault works not the other one.

sujin-sam commented 2 weeks ago

Sorry for the late reply. I'm taking a look

@having-fun-serverless any luck ?

FloSchl8 commented 6 days ago

I just stumbled upon the same issue while testing and found this closed issue here:

10

And after changing my env var to CHAOS_EXTENSION__RESPONSE__ENABLE_CHANGE_REPONSE_BODY with the missing S in RESPONSE it worked.

Seems like this fix isn't in version 9 yet...