【发布时间】:2019-07-12 13:29:06
【问题描述】:
我正在使用“RequestResponse”调用类型调用 aws lambda 函数并收到此错误:
我已经搜索过其他aws SDK支持的解决方案,但找不到python boto3的任何解决方案。
编辑:我正在使用 AWS Glue python shell 作业来运行我的代码,所以我无法控制系统时间。
Traceback (most recent call last):
File "/tmp/glue-python-libs-dgQjkA/audit_api_handler.py", line 532, in get_jobs_by_job_types
return self.get_api_response(method, params)
File "/tmp/glue-python-libs-dgQjkA/audit_api_handler.py", line 591, in get_api_response
LogType='Tail', Payload=json.dumps(post_data).encode())
File "/usr/local/lib/python2.7/site-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python2.7/site-packages/botocore/client.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions
.
ClientError
:
An error occurred (InvalidSignatureException) when calling the Invoke operation: Signature expired: 20190712T122841Z is now earlier than 20190712T122841Z (20190712T123341Z - 5 min.)
【问题讨论】:
-
你检查本地系统时间是否正确?
-
@MartinLöper 我正在使用 AWS Glue python shell,所以我想我显然无法控制系统时间。
-
您对启动粘合作业的子网(例如 NACL)的传出(或传入)流量是否有无状态限制?
-
@MartinLöper 我的胶水作业使用胶水连接,将其限制为 VPC。出于安全考虑,该 VPC 没有任何 NAT。删除该连接显然解决了我的问题。我只是在想这是否是因为胶水作业无法将其时间与现实世界同步。
-
@MartinLöper Glue 连接用于访问驻留在 VPC 中且没有任何公共 IP 地址的数据库。 Glue 连接是让 Glue 作业连接到此类数据库的配置。然而,它将粘合作业限制在 VPC 网络中。
标签: python amazon-web-services boto3 aws-glue