Skip to content

fix(integ-tests): Add IAM auth to API Gateway resources in integration tests#3963

Open
licjun wants to merge 1 commit into
developfrom
fix/apigateway-no-auth
Open

fix(integ-tests): Add IAM auth to API Gateway resources in integration tests#3963
licjun wants to merge 1 commit into
developfrom
fix/apigateway-no-auth

Conversation

@licjun

@licjun licjun commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Add IAM authorization to all API Gateway resources created by integration tests.

Changes

  • WebSocket APIs: Added Auth.AuthType: AWS_IAM (11 templates)
  • HTTP APIs: Added Auth.EnableIamAuthorizer: true + DefaultAuthorizer: AWS_IAM (10 templates)
  • REST APIs: Added Auth.DefaultAuthorizer: AWS_IAM (27 templates)
  • Added SigV4 request signing helpers to base_test.py
  • Updated tests that verify HTTP responses to use SigV4 signed requests
  • Updated expected status code from 403 to 404 for deleted routes with IAM auth

Testing

Verified locally against account 830899278857 (us-west-2):

  • test_basic_http_api
  • test_websocket_api_with_disable_execute_api_endpoint
  • test_function_with_http_api
  • test_function_with_http_api_default_path
  • test_function_with_implicit_http_api
  • test_state_machine_with_api_single_quotes_input
  • test_basic_api_inline_openapi
  • test_basic_api_with_mode

@licjun
licjun requested a review from a team as a code owner July 22, 2026 00:13
@licjun
licjun force-pushed the fix/apigateway-no-auth branch from e0e9baa to 36901fc Compare July 22, 2026 00:15

@aws-sam-tooling-bot aws-sam-tooling-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review Results

Reviewed: 6f67cf1..36901fc
Files: 56
Comments: 1

Comment thread integration/helpers/base_test.py
…n tests

Add IAM authorization to all API Gateway resources created by integration
tests.

Changes:
- WebSocket APIs: Added Auth.AuthType: AWS_IAM (11 templates)
- HTTP APIs: Added Auth.EnableIamAuthorizer + DefaultAuthorizer (10 templates)
- REST APIs: Added Auth.DefaultAuthorizer: AWS_IAM (27 templates)
- Added SigV4 request signing helpers to base_test.py
- Updated tests that verify HTTP responses to use SigV4 signed requests
- Updated expected status code from 403 to 404 for deleted routes with IAM auth
@licjun
licjun force-pushed the fix/apigateway-no-auth branch from 36901fc to 8dc28c2 Compare July 22, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant