> For the complete documentation index, see [llms.txt](https://llm-aws.course.gspivey.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://llm-aws.course.gspivey.com/reference/conventions.md).

# Conventions & Glossary

## Naming conventions

These conventions apply across all course projects. Following them keeps your code consistent with examples and makes debugging easier.

### Python

| Item                          | Convention              | Example                   |
| ----------------------------- | ----------------------- | ------------------------- |
| Module/file names             | `snake_case`            | `cik_lookup.py`           |
| Function names                | `snake_case`            | `get_company_filings`     |
| Class names                   | `PascalCase`            | `EdgarClient`             |
| Constants                     | `UPPER_SNAKE_CASE`      | `BASE_URL`                |
| Virtual environment directory | `venv/` at project root | `python3.12 -m venv venv` |

### AWS resources

| Item                       | Convention                          | Example                     |
| -------------------------- | ----------------------------------- | --------------------------- |
| S3 bucket names            | lowercase, hyphens, globally unique | `sec-filings-yourname-2026` |
| Lambda function names      | kebab-case with project prefix      | `sec-lambda-fetch-filing`   |
| CDK stack names            | PascalCase                          | `TenQInferenceStack`        |
| CloudFormation stack names | PascalCase (generated by CDK)       | `TenQInferenceStack`        |
| IAM role names             | PascalCase with suffix              | `SecLambdaExecutionRole`    |

### Repository and files

| Item                      | Convention                           | Example                                 |
| ------------------------- | ------------------------------------ | --------------------------------------- |
| Branch names              | `feature/short-description`          | `feature/add-error-handling`            |
| Commit messages           | imperative mood, under 72 characters | `Add User-Agent header to SEC requests` |
| Markdown file names       | kebab-case                           | `lambda-project-setup.md`               |
| Directory names (modules) | kebab-case                           | `project-sec-lambda/`                   |

## Python version

All course projects use **Python 3.12**. This applies to local development, Lambda runtime configuration, CDK project setup, and SAM templates.

## User-Agent header

Every HTTP request to SEC EDGAR must include a User-Agent header identifying you, per the SEC Fair Access policy. Use the format:

```
CompanyName YourEmail
```

For a student context:

```
CourseName your.email@university.edu
```

## Glossary

| Term                               | Definition                                                                                                                  |
| ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **10-K**                           | An annual report filed by public companies with the SEC. Contains audited financial statements.                             |
| **10-Q**                           | A quarterly report filed by public companies with the SEC. Contains unaudited financial statements for one quarter.         |
| **ARN**                            | Amazon Resource Name. A unique identifier for any AWS resource.                                                             |
| **Bedrock**                        | AWS managed service for accessing foundation models (LLMs) via API.                                                         |
| **CDK**                            | AWS Cloud Development Kit. An infrastructure-as-code framework that uses Python (in this course) to define cloud resources. |
| **CIK**                            | Central Index Key. A 10-digit numeric identifier the SEC assigns to every filing entity.                                    |
| **Converse API**                   | A Bedrock API that provides a unified interface across models. Alternative to `InvokeModel`.                                |
| **Cross-Region Inference Profile** | A Bedrock feature that routes model requests across regions for higher availability and throughput.                         |
| **EDGAR**                          | Electronic Data Gathering, Analysis, and Retrieval. The SEC's system for receiving, processing, and distributing filings.   |
| **IAM**                            | Identity and Access Management. AWS service for controlling who can do what in your account.                                |
| **InvokeModel**                    | The Bedrock API call used to send a prompt to a model and receive a response.                                               |
| **Lambda**                         | AWS Lambda. A serverless compute service that runs your code in response to events.                                         |
| **Layer (Lambda)**                 | A .zip archive containing libraries or dependencies, attached to a Lambda function.                                         |
| **MCP**                            | Model Context Protocol. A standard for exposing tools and resources to LLM-based agents.                                    |
| **RAG**                            | Retrieval Augmented Generation. A pattern that supplements an LLM prompt with retrieved context documents.                  |
| **SAM**                            | AWS Serverless Application Model. A CLI and template format for defining and deploying serverless applications.             |
| **Ticker**                         | A stock symbol identifying a publicly traded company (e.g., `AAPL` for Apple).                                              |
