Amazon Q developer cheatsheet learnt

Few commands

q help
q settings
q whoami

Learn the Core Workflows

As a professional, you’ll use Q mostly for code assistance + AWS workflows.

Core commands you should master:

q generate → generate or refactor code

q ex…


This content originally appeared on DEV Community and was authored by Santanu Bhattacharya

Few commands

q help
q settings
q whoami

Learn the Core Workflows

As a professional, you’ll use Q mostly for code assistance + AWS workflows.

Core commands you should master:

  • q generate → generate or refactor code
  • q explain → explain existing code
  • q test → write or improve unit tests
  • q run → execute code
  • q fix → debug/resolve errors
  • q ask → general-purpose Q&A (like ChatGPT but AWS/dev focused)

You can check the usage

  • /usage => Shows a summary of your current usage of Q.
  • /compact => Compacts the session history by summarizing previous prompts + responses. Keeps the conversation lighter and prevents Q from hitting context/token limits.
  • /quit => Ends the current Q session in your terminal.
  • /clear => Clears the current conversation history with Q
  • /save => Saves the current conversation to a file for later use.

q chat --resume

==> It will start from where you finished.

explain app/models/user.rb

generate rspec tests for app/models/mev.rb

ask "list all s3 buckets in my account"

test app/models/user.rb

fix "DB connection error in database.yml file"

ask "where in this project do we send emails?"

Go deeper

  1. Always run Q inside your project root so it reads your code.
  2. Be specific → “generate a Rails service object for sending user notification email” > “generate email code.”
  3. refine to refine the answer given by q, if you do not believe q in first instance
  4. Security mindset: Do not copy blindly

AWS Pro Workflows

Q to speed up AWS development:

Infra as Code (Pulumi/CDK/Terraform)

q chat --resume

| ask "command to list all ec2 instances in ap-southeast-1"

will give the bash command for using with aws-cli

| generate pulumi code in yaml for listing all ec2 instances in ap-southeast-1

Will create the Pulumi.dv.yaml

Now pulumi up will help to list down the instances

NB: When you give prompt, explain more to get more accurate result, q will behave like a senior developer

Example:

generate s3 upload code
vs

generate rails service object UploadFileService with method call(file:, bucket:) using aws-sdk-s3 gem, include unit tests with rspec

To be continued...


This content originally appeared on DEV Community and was authored by Santanu Bhattacharya


Print Share Comment Cite Upload Translate Updates
APA

Santanu Bhattacharya | Sciencx (2025-09-04T12:30:44+00:00) Amazon Q developer cheatsheet learnt. Retrieved from https://www.scien.cx/2025/09/04/amazon-q-developer-cheatsheet-learnt/

MLA
" » Amazon Q developer cheatsheet learnt." Santanu Bhattacharya | Sciencx - Thursday September 4, 2025, https://www.scien.cx/2025/09/04/amazon-q-developer-cheatsheet-learnt/
HARVARD
Santanu Bhattacharya | Sciencx Thursday September 4, 2025 » Amazon Q developer cheatsheet learnt., viewed ,<https://www.scien.cx/2025/09/04/amazon-q-developer-cheatsheet-learnt/>
VANCOUVER
Santanu Bhattacharya | Sciencx - » Amazon Q developer cheatsheet learnt. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/09/04/amazon-q-developer-cheatsheet-learnt/
CHICAGO
" » Amazon Q developer cheatsheet learnt." Santanu Bhattacharya | Sciencx - Accessed . https://www.scien.cx/2025/09/04/amazon-q-developer-cheatsheet-learnt/
IEEE
" » Amazon Q developer cheatsheet learnt." Santanu Bhattacharya | Sciencx [Online]. Available: https://www.scien.cx/2025/09/04/amazon-q-developer-cheatsheet-learnt/. [Accessed: ]
rf:citation
» Amazon Q developer cheatsheet learnt | Santanu Bhattacharya | Sciencx | https://www.scien.cx/2025/09/04/amazon-q-developer-cheatsheet-learnt/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.