Skip to content

Commit baff279

Browse files
committed
Updated to make AWS runtime API version a constant
1 parent 8a09157 commit baff279

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

AWSCustomRuntime.pas

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
httpClient: TFPHTTPClient;
1111
awsEvent, awsError: TJSONObject;
1212

13+
const
14+
// Current AWS runtime API version
15+
APIVERSION = '2018-06-01';
16+
1317
begin
1418
awsEvent := TJSONObject.Create;
1519
awsError := TJSONObject.Create;
@@ -19,7 +23,7 @@
1923
awsHost := GetEnvironmentVariable('AWS_LAMBDA_RUNTIME_API');
2024

2125
// Create the base url
22-
awsBaseUrl := 'http://' + awsHost + '/2018-06-01/runtime/invocation/';
26+
awsBaseUrl := 'http://' + awsHost + '/' + APIVERSION + '/runtime/invocation/';
2327

2428
while true do begin
2529
try

0 commit comments

Comments
 (0)