Skip to content

Commit 47d201c

Browse files
feat(aws-api-mcp-server): added connect and read timeout configuration (#1867)
* feat(aws-api-mcp-server): added connect and read timeout configuraiton * updated change log * reverted README change
1 parent d6344f8 commit 47d201c

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

src/aws-api-mcp-server/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
### Changed
11+
12+
- Updated default AWS API connect and read timeout (#1876)
13+
14+
## [1.1.8] - 2025-11-28
15+
16+
1017
### Fixed
1118

1219
- Origin header parsing (#1851)

src/aws-api-mcp-server/awslabs/aws_api_mcp_server/core/common/config.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,3 +150,5 @@ def get_user_agent_extra() -> str:
150150
ENDPOINT_SUGGEST_AWS_COMMANDS = os.getenv(
151151
'ENDPOINT_SUGGEST_AWS_COMMANDS', 'https://api-mcp.global.api.aws/suggest-aws-commands'
152152
)
153+
CONNECT_TIMEOUT_SECONDS = 10
154+
READ_TIMEOUT_SECONDS = 60

src/aws-api-mcp-server/awslabs/aws_api_mcp_server/core/parser/interpretation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
extract_pagination_config,
1919
)
2020
from ..common.command import IRCommand, OutputFile
21-
from ..common.config import get_user_agent_extra
21+
from ..common.config import CONNECT_TIMEOUT_SECONDS, READ_TIMEOUT_SECONDS, get_user_agent_extra
2222
from ..common.file_system_controls import validate_file_path
2323
from ..common.helpers import operation_timer
2424
from botocore.config import Config
@@ -51,8 +51,8 @@ def interpret(
5151

5252
config = Config(
5353
region_name=region,
54-
connect_timeout=TIMEOUT_AFTER_SECONDS,
55-
read_timeout=TIMEOUT_AFTER_SECONDS,
54+
connect_timeout=CONNECT_TIMEOUT_SECONDS,
55+
read_timeout=READ_TIMEOUT_SECONDS,
5656
retries={'max_attempts': 3, 'mode': 'adaptive'},
5757
user_agent_extra=get_user_agent_extra(),
5858
)

src/aws-api-mcp-server/tests/aws/test_service.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def test_interpret_returns_missing_context_failures():
105105
(
106106
'aws cloud9 list-environments',
107107
CLOUD9_LIST_ENVIRONMENTS,
108-
('ListEnvironments', {}, 'us-east-1', 10, 'https://cloud9.us-east-1.amazonaws.com'),
108+
('ListEnvironments', {}, 'us-east-1', 60, 'https://cloud9.us-east-1.amazonaws.com'),
109109
'cloud9',
110110
'AWS Cloud9',
111111
'ListEnvironments',
@@ -119,7 +119,7 @@ def test_interpret_returns_missing_context_failures():
119119
'Filters': [{'Name': 'instance-state-name', 'Values': ['running']}],
120120
},
121121
'us-east-1',
122-
10,
122+
60,
123123
'https://ec2.us-east-1.amazonaws.com',
124124
),
125125
'ec2',
@@ -133,7 +133,7 @@ def test_interpret_returns_missing_context_failures():
133133
'DescribeInstances',
134134
{},
135135
'us-east-1',
136-
10,
136+
60,
137137
'https://ec2.us-east-1.amazonaws.com',
138138
),
139139
'ec2',
@@ -152,7 +152,7 @@ def test_interpret_returns_missing_context_failures():
152152
]
153153
},
154154
'us-east-1',
155-
10,
155+
60,
156156
'https://cloud9.us-east-1.amazonaws.com',
157157
),
158158
'cloud9',
@@ -162,7 +162,7 @@ def test_interpret_returns_missing_context_failures():
162162
(
163163
'aws sts get-caller-identity',
164164
GET_CALLER_IDENTITY_PAYLOAD,
165-
('GetCallerIdentity', {}, 'us-east-1', 10, 'https://sts.us-east-1.amazonaws.com'),
165+
('GetCallerIdentity', {}, 'us-east-1', 60, 'https://sts.us-east-1.amazonaws.com'),
166166
'sts',
167167
'AWS Security Token Service',
168168
'GetCallerIdentity',
@@ -183,7 +183,7 @@ def test_interpret_returns_missing_context_failures():
183183
],
184184
},
185185
'us-east-1',
186-
10,
186+
60,
187187
'https://ssm.us-east-1.amazonaws.com',
188188
),
189189
'ssm',

0 commit comments

Comments
 (0)