keda-connectors icon indicating copy to clipboard operation
keda-connectors copied to clipboard

AWS SQS Connector failed to get environment variable

Open AnthraX1 opened this issue 3 years ago • 3 comments

I'm following the docs at https://docs.fission.io/docs/triggers/message-queue-trigger-kind-keda/aws-sqs/ . I've setup kubectl secrets per instruction and ran fission mqt create --name sqstest --function sqstest --mqtype=aws-sqs-queue --topic=fission-test --mqtkind=keda --metadata queueURL=https://sqs.us-west-2.amazonaws.com/xxxxx/fission-test --metadata awsRegion=us-west-2 --secret aws-secret to create the trigger. However, the connector pod won't start correctly:

kubectl get pods -A

... default sqstest-7d6fc4d78c-whq4w 0/1 CrashLoopBackOff 1 11s ...

kubectl logs sqstest-7d6fc4d78c-whq4w

{"level":"error","ts":1609595317.8034132,"caller":"app/main.go:201","msg":"failed to fetch aws config","error":"no aws configuration specified","stacktrace":"main.main\n\t/app/main.go:201\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:200"}

kubectl get pod sqstest-7568bc9cbd-c7gjd -o json

.... "spec": { "containers": [ { "env": [ { "name": "TOPIC", "value": "fission-test" }, { "name": "HTTP_ENDPOINT", "value": "http://router.fission/fission-function/sqstest" }, { "name": "ERROR_TOPIC" }, { "name": "RESPONSE_TOPIC" }, { "name": "SOURCE_NAME", "value": "sqstest" }, { "name": "MAX_RETRIES", "value": "0" }, { "name": "CONTENT_TYPE", "value": "application/json" }, { "name": "AWS_REGION", "value": "us-west-2" }, { "name": "QUEUE_URL", "value": "https://sqs.us-west-2.amazonaws.com/xxxxxxxxx/fission-test" }, { "name": "AWS_ACCESS_KEY_ID", "value": "xxxxxxxxxxxxx" }, { "name": "AWS_SECRET_ACCESS_KEY", "value": "xxxxxxxxxxxxx" } ], "image": "fission/keda-aws-sqs-http-connector:1", ....

From the pod env you can see the access keys are correctly set but the pod still crashes with the same error.

AnthraX1 avatar Jan 02 '21 15:01 AnthraX1