# Code Completion

Code completion suggests code or configuration at the cursor while an engineer edits a file.

Cloud concept. Updated 2026-12-01. Page: https://blowstack.com/tools/cloud-concepts-hub/code-completion

> Code completion uses context such as the current expression, available types, or nearby comments to suggest what to write next. It reduces repetitive typing and helps engineers discover APIs and configuration fields, but a suggestion still needs to be checked against the project's requirements and runtime environment.

Practice exams covering Code Completion: [DVA-C03 AWS Certified Developer - Associate](https://blowstack.com/practice-exams/aws-certified-developer-associate).

## 5 key aspects of Code Completion

Code completion uses language, schema, or model context to offer edits, while engineers control what is accepted and how it is verified.

1. **Editor-time suggestions**: An editor presents suggestions at the cursor as a menu or inline text. Accept only the portion that matches the intended change when the editor supports partial acceptance.
2. **Language and schema awareness**: Language servers and schema-aware editors use symbols, types, dependencies, or schemas to suggest valid names and fields. Keep the project environment in sync with the versions pinned in source control.
3. **AI-assisted continuation**: An AI model can propose expressions, statements, or multi-line blocks from the context available to it. A nearby example or a comment that states a concrete constraint can guide the suggestion, but neither guarantees correctness.
4. **Verification before deployment**: Treat accepted code like any other change: review the diff and run relevant tests and static checks. For infrastructure changes, also inspect the plan and check it against policy before applying it.
5. **Control of workspace context**: For hosted completion, check which files or snippets are sent, how the service handles them, and which administrative controls apply. Use only approved tools and settings for sensitive repositories.

## Cloud services for Code Completion

Amazon Q Developer, GitHub Copilot, and Gemini Code Assist are alternatives for hosted AI-assisted completion; a team does not need to connect them to one another. An AI completion extension can work alongside an editor's language server or schema tooling: the latter can help resolve installed SDK symbols and allowed configuration fields, while the AI extension can suggest longer continuations. Choose a service based on editor and language support, organizational controls, and how it handles repository context. Regardless of the service, pass accepted changes through the same review, test, and deployment checks as handwritten code.

- **[Amazon Q](https://blowstack.com/tools/cloud-services-hub/amazon-q)**: Amazon Q Developer provides inline AI code suggestions in supported IDEs. It can suggest continuations from existing code and comments as engineers write cloud application code.

## What is Code Completion

Code completion is an editing aid, not a separate build or deployment step. It can offer a menu of valid members after a dot, fill in a function call, or show several proposed lines inline. The engineer can accept, edit, or ignore the suggestion. Traditional completion often uses a language server, compiler information, or a configuration schema to identify symbols and fields. AI-assisted completion predicts a continuation from available context, which can include nearby code, comments, and other files the tool is allowed to read. Editors can offer both: a language server can identify a method on an installed SDK client, while an AI assistant can draft the loop that uses it.

In cloud application code, completion is useful for navigating SDKs and following project conventions. For example, after an engineer types a reference to a storage client, the editor can show methods from the installed SDK. An AI completion might then suggest a loop to list objects across multiple pages. Before accepting it, the engineer should check how the pinned SDK version handles pagination and verify that the workload's runtime identity has permission to list the intended storage location. The code can compile and pass mocked tests while still failing against the deployed environment.

Completion also applies to infrastructure as code. A schema-aware editor can suggest fields for a resource declaration, while an AI assistant can draft values based on neighboring declarations. A field can be valid without being appropriate: a suggested network rule might allow more traffic than intended. Validate the configuration against the project's pinned provider or schema version, then review the deployment plan and run policy checks before applying changes.

Clear local context makes AI suggestions easier to evaluate. A comment such as “return an empty result when no records match, but propagate authorization errors” gives a completion more useful guidance than “handle errors.” That is still completion when the tool proposes a continuation at the cursor; generating a broader implementation from a specification is a different workflow. Likewise, a completion can suggest replacing a repeated operation with a batch call, but it does not establish that the change preserves behavior or improves performance. Use tests and measurements for those claims, and use code review and security scanning to check accepted changes rather than treating the suggestion itself as a review.

The main trade-off is typing time saved versus time spent checking and correcting suggestions. Short, type-aware completions are usually easy to verify. Longer AI suggestions can save more typing, but may invent an API, reuse an outdated pattern, or overlook a project constraint. If completion uses a hosted model, check what code and workspace context the editor sends and what the service retains. Keep secrets out of files and comments, and use approved settings for repositories with restricted data. The completion engine and the application runtime are independent: completion can run locally for code deployed to the cloud, or use a hosted model for code that never leaves a local runtime.

## Code Completion exam questions

Real practice exam questions on Code Completion, with the correct answer and its explanation.

### Question 1 (DVA-C03)

**Question:**

A developer is adding a helper to an application that runs on Amazon ECS. The helper publishes processing latency to Amazon CloudWatch. The developer has written the function signature and a comment specifying that latency is measured in milliseconds. A nearby helper shows how the application sets metric dimensions. The team already uses Amazon Q Developer in a supported IDE. The developer wants the IDE to draft the next few lines from the surrounding code and comment while they type, so they can inspect the proposed SDK request before inserting it. What should the developer do?

**Correct answer:** Use Amazon Q Developer's inline suggestions at the cursor. Check the proposed SDK request for the correct unit and dimensions before accepting or editing it.

**Explanation:** Inline suggestions use editing context, such as nearby code and comments, to propose a continuation as the developer types. The developer can inspect the draft before inserting it and verify that it follows the application's metric conventions.

## Practice Code Completion in a full exam

Questions on Code Completion in each practice exam, with every answer option and an explanation for each:

- [DVA-C03](https://blowstack.com/practice-exams/aws-certified-developer-associate): 1 question

## Learn Code Completion in lessons

2 short lessons on Code Completion in 1 certification course.

- DVA-C03: Code Completion: AI suggestions in the editor (free), https://app.blowstack.com/lessons/code-completion-ai-suggestions-in-the-editor-dva-c03
- DVA-C03: Code Completion vs. Spec-Driven Development (free), https://app.blowstack.com/lessons/code-completion-vs-spec-driven-development-dva-c03
