質問編集履歴

1

コード等載せました

2019/06/18 08:34

投稿

pekopeko
pekopeko

スコア11

test CHANGED
File without changes
test CHANGED
@@ -20,17 +20,59 @@
20
20
 
21
21
  エラーメッセージ
22
22
 
23
+ TypeError: must be str, not tuple
24
+
23
25
  ```
24
26
 
25
27
 
26
28
 
27
29
  ### 該当のソースコード
28
30
 
31
+ SigV4Auth(credentials, SERVICE_NAME, region).add_auth(request)
32
+
33
+
34
+
29
35
 
30
36
 
31
37
  ```python
32
38
 
33
39
  ソースコード
40
+
41
+ import os
42
+
43
+ import botocore
44
+
45
+ import botocore.endpoint
46
+
47
+ from botocore.awsrequest import AWSRequest
48
+
49
+ from botocore.auth import SigV4Auth
50
+
51
+ from botocore.credentials import Credentials
52
+
53
+
54
+
55
+ aws_access_key_id = "xxx",
56
+
57
+ aws_secret_access_key = "xxx",
58
+
59
+ region = 'xxx'
60
+
61
+
62
+
63
+ METHOD = "Post"
64
+
65
+ URL = "xxx"
66
+
67
+ SERVICE_NAME = "GetTaxInvoice"
68
+
69
+
70
+
71
+ credentials = Credentials(aws_access_key_id, aws_secret_access_key)
72
+
73
+ request = AWSRequest(method=METHOD, url=URL)
74
+
75
+ SigV4Auth(credentials, SERVICE_NAME, region).add_auth(request)
34
76
 
35
77
  ```
36
78