Socket
Book a DemoInstallSign in
Socket

@aws-sdk/client-elasticache

Package Overview
Dependencies
Maintainers
2
Versions
492
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-sdk/client-elasticache

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

latest
Source
npmnpm
Version
3.896.0
Version published
Weekly downloads
221K
-0.9%
Maintainers
2
Weekly downloads
 
Created

What is @aws-sdk/client-elasticache?

@aws-sdk/client-elasticache is an AWS SDK for JavaScript package that allows developers to interact with Amazon ElastiCache, a web service that makes it easy to deploy, operate, and scale an in-memory cache in the cloud. The package provides a variety of functionalities to manage ElastiCache clusters, replication groups, snapshots, and more.

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

Create Cache Cluster

This feature allows you to create a new cache cluster in ElastiCache. The code sample demonstrates how to create a Redis cache cluster with one cache node of type 'cache.t2.micro'.

const { ElastiCacheClient, CreateCacheClusterCommand } = require('@aws-sdk/client-elasticache');

const client = new ElastiCacheClient({ region: 'us-west-2' });
const params = {
  CacheClusterId: 'my-cache-cluster',
  Engine: 'redis',
  CacheNodeType: 'cache.t2.micro',
  NumCacheNodes: 1
};

const run = async () => {
  try {
    const data = await client.send(new CreateCacheClusterCommand(params));
    console.log('Cache Cluster Created:', data);
  } catch (err) {
    console.error('Error:', err);
  }
};

run();

Describe Cache Clusters

This feature allows you to retrieve information about all cache clusters. The code sample demonstrates how to describe all cache clusters in the specified region.

const { ElastiCacheClient, DescribeCacheClustersCommand } = require('@aws-sdk/client-elasticache');

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

const run = async () => {
  try {
    const data = await client.send(new DescribeCacheClustersCommand(params));
    console.log('Cache Clusters:', data.CacheClusters);
  } catch (err) {
    console.error('Error:', err);
  }
};

run();

Delete Cache Cluster

This feature allows you to delete an existing cache cluster. The code sample demonstrates how to delete a cache cluster with the specified CacheClusterId.

const { ElastiCacheClient, DeleteCacheClusterCommand } = require('@aws-sdk/client-elasticache');

const client = new ElastiCacheClient({ region: 'us-west-2' });
const params = {
  CacheClusterId: 'my-cache-cluster'
};

const run = async () => {
  try {
    const data = await client.send(new DeleteCacheClusterCommand(params));
    console.log('Cache Cluster Deleted:', data);
  } catch (err) {
    console.error('Error:', err);
  }
};

run();

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

FAQs

Package last updated on 24 Sep 2025

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