Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@aws-sdk/client-ssm
Advanced tools
AWS SDK for JavaScript Ssm Client for Node.js, Browser and React Native
The @aws-sdk/client-ssm package is a client library for the AWS Systems Manager (SSM) service. It allows developers to interact with the SSM service programmatically to manage configuration and automation tasks. The package provides methods to send commands, manage parameters, and configure instances and applications.
Managing Parameters
This feature allows you to create and manage parameters in the AWS Systems Manager Parameter Store. The code sample demonstrates how to put a new parameter into the Parameter Store.
const { SSMClient, PutParameterCommand } = require('@aws-sdk/client-ssm');
const client = new SSMClient({ region: 'us-west-2' });
const command = new PutParameterCommand({
Name: 'parameterName',
Value: 'parameterValue',
Type: 'String'
});
client.send(command).then((data) => console.log(data)).catch((error) => console.error(error));
Sending Commands
This feature enables you to send commands to instances for execution. The code sample shows how to send a simple shell script command to an EC2 instance.
const { SSMClient, SendCommandCommand } = require('@aws-sdk/client-ssm');
const client = new SSMClient({ region: 'us-west-2' });
const command = new SendCommandCommand({
InstanceIds: ['i-1234567890abcdef0'],
DocumentName: 'AWS-RunShellScript',
Parameters: { 'commands': ['echo "Hello World"'] }
});
client.send(command).then((data) => console.log(data.CommandId)).catch((error) => console.error(error));
Getting Command Invocation Results
This feature is used to retrieve the results of a command execution on a particular instance. The code sample demonstrates how to get the result of a command invocation.
const { SSMClient, GetCommandInvocationCommand } = require('@aws-sdk/client-ssm');
const client = new SSMClient({ region: 'us-west-2' });
const command = new GetCommandInvocationCommand({
CommandId: 'commandId',
InstanceId: 'i-1234567890abcdef0'
});
client.send(command).then((data) => console.log(data)).catch((error) => console.error(error));
The 'aws-sdk' package is the older version of the AWS SDK for JavaScript. It provides similar functionalities to interact with AWS services, including SSM. However, @aws-sdk/client-ssm is part of the newer AWS SDK v3, which is modular and allows for importing only the specific clients needed, potentially reducing bundle sizes.
Boto3 is the AWS SDK for Python, which provides similar functionalities for interacting with AWS services, including SSM. While it serves the same purpose, it is designed for Python developers and cannot be used in a Node.js environment.
The Azure SDK for JavaScript is similar in concept to @aws-sdk/client-ssm but for Microsoft Azure services. It allows developers to manage and interact with Azure resources. It is not directly comparable in terms of functionality because it targets a different cloud provider.
FAQs
AWS SDK for JavaScript Ssm Client for Node.js, Browser and React Native
The npm package @aws-sdk/client-ssm receives a total of 1,270,781 weekly downloads. As such, @aws-sdk/client-ssm popularity was classified as popular.
We found that @aws-sdk/client-ssm demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.