Skip to content

Testing the lambda

1

Hi,

I am facing the below error while testing the "Phonelookup" salesforce operation using the lambda function "SFInvokeAPI" {   "errorMessage": "Parameter validation failed:\nInvalid length for parameter SecretId, value: 0, valid range: 1-inf",   "errorType": "ParamValidationError",   "stackTrace": [     "  File "/var/task/sfInvokeAPI.py", line 47, in lambda_handler\n    sf = Salesforce()\n",     "  File "/var/task/salesforce.py", line 45, in init\n    self.__load_credentials()\n",     "  File "/var/task/salesforce.py", line 65, in __load_credentials\n    self.secrets = json.loads(self.secrets_manager_client.get_secret_value(SecretId=self.sf_credentials_secrets_manager_arn)["SecretString"])\n",     "  File "/opt/python/lib/python3.7/site-packages/botocore/client.py", line 357, in _api_call\n    return self._make_api_call(operation_name, kwargs)\n",     "  File "/opt/python/lib/python3.7/site-packages/botocore/client.py", line 634, in _make_api_call\n    api_params, operation_model, context=request_context)\n",     "  File "/opt/python/lib/python3.7/site-packages/botocore/client.py", line 682, in _convert_to_request_dict\n    api_params, operation_model)\n",     "  File "/opt/python/lib/python3.7/site-packages/botocore/validate.py", line 297, in serialize_to_request\n    raise ParamValidationError(report=report.generate_report())\n"   ] } Any inputs on this problem would be helpful

Thanks, Santhosh

2 Answers
0

Hi, I would check that secret credentials are correctly returned, as it’s length seems to be 0 while it should be at least 1.

Try to print them out.

EXPERT
answered 3 years ago
0

I have the same error. Where can I find the SecretId? I don't have AWS CLI right now.. where can I set it via GUI? I followed the documentation and I get the KMS Secret ARN etc... so I don't know how the SecretID can be empty?

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.