Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-sdk/client-amplify

Package Overview
Dependencies
Maintainers
0
Versions
423
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-amplify

AWS SDK for JavaScript Amplify Client for Node.js, Browser and React Native

  • 3.709.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
109K
increased by11.83%
Maintainers
0
Weekly downloads
 
Created

What is @aws-sdk/client-amplify?

@aws-sdk/client-amplify is a part of the AWS SDK for JavaScript, which allows developers to interact with AWS Amplify, a service for building and deploying mobile and web applications. This package provides methods to manage Amplify apps, branches, domains, and webhooks.

What are @aws-sdk/client-amplify's main functionalities?

Create an Amplify App

This feature allows you to create a new Amplify app by specifying the app name, repository, and platform. The code sample demonstrates how to use the CreateAppCommand to create an app.

const { AmplifyClient, CreateAppCommand } = require('@aws-sdk/client-amplify');

const client = new AmplifyClient({ region: 'us-west-2' });

const createApp = async () => {
  const params = {
    name: 'MyAmplifyApp',
    repository: 'https://github.com/my-repo',
    platform: 'WEB'
  };
  const command = new CreateAppCommand(params);
  const response = await client.send(command);
  console.log(response);
};

createApp();

List Amplify Apps

This feature allows you to list all the Amplify apps in your account. The code sample demonstrates how to use the ListAppsCommand to retrieve and print the list of apps.

const { AmplifyClient, ListAppsCommand } = require('@aws-sdk/client-amplify');

const client = new AmplifyClient({ region: 'us-west-2' });

const listApps = async () => {
  const command = new ListAppsCommand({});
  const response = await client.send(command);
  console.log(response.apps);
};

listApps();

Create a Branch

This feature allows you to create a new branch in an existing Amplify app. The code sample demonstrates how to use the CreateBranchCommand to create a branch.

const { AmplifyClient, CreateBranchCommand } = require('@aws-sdk/client-amplify');

const client = new AmplifyClient({ region: 'us-west-2' });

const createBranch = async () => {
  const params = {
    appId: 'd1e2f3g4h5',
    branchName: 'new-feature-branch'
  };
  const command = new CreateBranchCommand(params);
  const response = await client.send(command);
  console.log(response);
};

createBranch();

Delete an Amplify App

This feature allows you to delete an existing Amplify app. The code sample demonstrates how to use the DeleteAppCommand to delete an app by specifying its appId.

const { AmplifyClient, DeleteAppCommand } = require('@aws-sdk/client-amplify');

const client = new AmplifyClient({ region: 'us-west-2' });

const deleteApp = async () => {
  const params = {
    appId: 'd1e2f3g4h5'
  };
  const command = new DeleteAppCommand(params);
  const response = await client.send(command);
  console.log(response);
};

deleteApp();

Other packages similar to @aws-sdk/client-amplify

FAQs

Package last updated on 10 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc