✨ Add AWS E2E tests with GitHub OIDC authentication
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 6h 51m
- Merged PRs (30d)
- 104
Description
Summary
Add on-demand AWS E2E testing in GitHub Actions using OIDC authentication (no long-lived ACCESS_KEY secrets). Tests should run for approved PRs via a label trigger.
Motivation
- Current E2E tests only run against LocalStack
- Real AWS testing catches issues that LocalStack doesn't emulate perfectly (IAM, CloudWatch, Lambda cold starts)
- OIDC authentication is the secure, modern approach - no secrets to rotate
Implementation Plan
Phase 1: AWS Infrastructure Setup
1.1 Create GitHub OIDC Identity Provider
AWSTemplateFormatVersion: '2010-09-09'
Description: GitHub Actions OIDC Provider
Resources:
GitHubOIDCProvider:
Type: AWS::IAM::OIDCProvider
Properties:
Url: https://token.actions.githubusercontent.com
ClientIdList:
- sts.amazonaws.com
ThumbprintList:
- 6938fd4d98bab03faadb97b34396831e3780aea1
1.2 Create IAM Role for GitHub Actions
- Trust policy restricts to
zeroae/zae-limiterrepo - Resource-based restrictions to
ZAEL-e2e-*resources only - Compatible with Control Tower permission boundaries
- Least-privilege permissions for: CloudFormation, DynamoDB, Lambda, CloudWatch, SQS, IAM (for Lambda roles)
Phase 2: GitHub Actions Workflow
Create .github/workflows/aws-e2e.yml with:
-
Triggers:
workflow_dispatchfor manual runspull_requestwithlabeledevent (triggers onaws-e2elabel)
-
Authentication:
- Uses
aws-actions/configure-aws-credentials@v4with OIDC - No long-lived secrets required
- 1-hour session duration
- Uses
-
Features:
- Concurrency control to prevent resource conflicts
- Option to skip slow tests (monitoring, snapshots)
- PR comment with test results
- Automatic cleanup of orphaned stacks
Phase 3: Security Controls
- Consider dedicated sandbox account in Control Tower for isolation
- Create
aws-e2eGitHub environment with protection rules (optional approval gate) - Fine-grained trust conditions in IAM role (branch/environment restrictions)
Tasks
- Deploy GitHub OIDC Identity Provider to AWS
- Create IAM Role with appropriate permissions and trust policy
- Add
AWS_ACCOUNT_IDto repository secrets - Create
.github/workflows/aws-e2e.ymlworkflow - Create
aws-e2elabel in repository - Update
tests/e2e/test_aws.pyto support configurable name prefix via environment variable - (Optional) Create
aws-e2eGitHub environment with approval rules - Test end-to-end: manual dispatch and label-triggered runs
- Document the setup in CLAUDE.md
Security Considerations
| Approach | Security | Recommendation |
|---|---|---|
| OIDC + IAM Role | ★★★★★ | Recommended |
| Long-lived ACCESS_KEY | ★★☆☆☆ | ❌ Avoid |
How OIDC Works
┌─────────────────┐ 1. Request OIDC token ┌─────────────────┐
│ GitHub Actions │ ──────────────────────────► │ GitHub OIDC │
│ Workflow │ ◄────────────────────────── │ Provider │
└────────┬────────┘ 2. JWT token └─────────────────┘
│
│ 3. AssumeRoleWithWebIdentity (JWT)
▼
┌─────────────────┐ 4. Short-lived creds ┌─────────────────┐
│ AWS STS │ ──────────────────────────► │ IAM Role │
│ │ │ (Trust GitHub) │
└─────────────────┘ └─────────────────┘
References
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with tests/e2e/test_aws.py and the repository’s existing GitHub Actions setup, then map the requested AWS resources and permissions to the proposed .github/workflows/aws-e2e.yml workflow. Review the OIDC and IAM requirements before implementing the label and manual triggers. Done means approved AWS E2E runs authenticate without long-lived credentials, report results, clean up resources, and the setup is documented in CLAUDE.md.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, github-actions, python
- Domain
- ci-cd, cloud, devops, security, testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100