I need to run some kubectl commands in a lambda function against an EKS cluster. This function will eventually need to query ECR to get the image.I am running into the error described below when using aws-lambda-layer-kubectl
I believe I have correctly deployed the lambda layer as I can see its ARN arn:aws:lambda:us-east-1:xxxxxxxx:layer:kubelambda:1
The lambda function code looks as follows
However when I run the lambda function I get the following error
/var/task/bootstrap: line 7: aws: command not found
/var/task/bootstrap: line 12: kubectl: command not found
Questions
- What is wrong here?
- Are there any specific policies to retrieve images from ECR?
Thank you in advance.

