# GitHub Actions: Context access might be invalid: AWS_ACCESS_KEY_ID (editor warning for secrets/vars)

**Code:** `Context access might be invalid` · **Category:** CI/CD · **Seen on:** GitHub Actions

The GitHub Actions editor or extension flags a `secrets.X` or `vars.X` reference that is not defined in the repository — usually a harmless warning, but it can reveal a real missing secret.

## Meaning

The VS Code extension and the web editor check references against the secrets and variables that exist. If the secret lives in an environment, organization or Dependabot scope, or is created later, the warning appears. If the secret truly does not exist, the step will receive an empty string.

## Common causes

- Secret/variable not created yet or created in another repository
- Defined at environment level but referenced outside that environment
- Organization secret not shared with this repository
- Name typo or wrong case
- Editor lacks permission to read the list of secrets

## Quick fix

1. Create the secret/variable or fix the name
2. Make sure the job uses the right `environment:`
3. Share the organization secret with the repository

## Detailed fix by platform

### GitHub Actions

1. Settings → Secrets and variables → Actions (repository, environment and organization tabs)
2. Verify in a step without printing: `test -n "$X" && echo ok
3. echo missing`

## How to diagnose

1. **Scope** — Where is the secret defined?
2. **Name** — Spelling and case?
3. **Environment** — Does the job select it?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cicd/gha-context-access-might-be-invalid)
