Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Swyx Amplify VSCode SnippetsNew to Visual Studio Code? Get it now.
Swyx Amplify VSCode Snippets

Swyx Amplify VSCode Snippets

swyx

|
660 installs
| (0) | Free
Unofficial Amplify VSCode Snippets
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

This is an unofficial snippets extension for AWS Amplify users. Speed up your development by scaffolding out commonly used code snippets for Amplify CSS, UI Components, API/DataStore calls, and GraphQL Transform directives.

:warning: this is unofficial and has not formally maintained by the Amplify team! It is a personal project of some employees. On the plus side, it's very simple. pls feel free to fork and customize your own! There is an older extension where you can find more snippets here.

See Gif Demo

amplifysnippets

Install

You can add this by searching Amplify Snippets in your VS Code Extensions.

Direct link here: https://marketplace.visualstudio.com/items?itemName=sw-yx.amplify-vscode-snippets

Snippets Included

TypeScript/JavaScript

Prefix Method
import amplify→ import Amplify from 'aws-amplify';import awsconfig from './aws-exports';Amplify.configure(awsconfig);
withAuthenticator→ import { withAuthenticator, AmplifySignOut } from \"@aws-amplify/ui-react\"
import API from Amplify→ import { API } from 'aws-amplify'
DataStore import→ import { DataStore } from '@aws-amplify/datastore' etc
DataStore Read→ relevant sample code - specific to React for now
DataStore Create→ relevant sample code
DataStore Update→ relevant sample code
DataStore Delete→ relevant sample code

CSS

Prefix Method
Amplify :root→ --amplify-primary-color/tint/shade

GraphQL

Prefix Method
@auth public read→ @auth(rules: [{ allow: owner, queries: null }])
@auth everything private→ @auth(rules: [{ allow: owner }])
basic @model with no auth→ type Todo @model { /* etc */ }

Known Issues

this is not an official extension! it is just a helper for swyx

Publishing

  • vsce publish minor
  • https://code.visualstudio.com/api/working-with-extensions/publishing-extension
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft