rackerlabs / lambda-uploader

Helps package and upload Python lambda functions to AWS
Apache License 2.0
272 stars 56 forks source link

Security Token Error #165

Closed gamename closed 6 years ago

gamename commented 6 years ago

Hi,

I'm getting the following error why trying to upload a new function

lambda-uploader --publish  ./audit \
                        --extra-file ./common.py \
                        --config ./audit/lambda.json
λ Building Package
λ Uploading Package
⁉️ Unexpected error. Please report this traceback.
Uploader: 1.3.0
Botocore: 1.7.14
Boto3: 1.10.14

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/lambda_uploader/shell.py", line 194, in main
    _execute(args)
  File "/Library/Python/2.7/site-packages/lambda_uploader/shell.py", line 103, in _execute
    upldr.upload(pkg)
  File "/Library/Python/2.7/site-packages/lambda_uploader/uploader.py", line 145, in upload
    self.version = self.upload_new(pkg)
  File "/Library/Python/2.7/site-packages/lambda_uploader/uploader.py", line 122, in upload_new
    TracingConfig=self._config.tracing,
  File "/Library/Python/2.7/site-packages/botocore/client.py", line 314, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/Library/Python/2.7/site-packages/botocore/client.py", line 612, in _make_api_call
    raise error_class(parsed_response, operation_name)
ClientError: An error occurred (UnrecognizedClientException) when calling the CreateFunction operation: The security token included in the request is invalid.
make: *** [build] Error 1

Any idea what I'm doing wrong?

jarosser06 commented 6 years ago

It looks like you may not have valid AWS credentials or at least your token isn't correct. Are you able to run aws cli commands with those credentials?

gamename commented 6 years ago

You're right. It was authentication on my side