Socket
Socket
Sign inDemoInstall

@aws-cdk/aws-ssm

Package Overview
Dependencies
Maintainers
5
Versions
288
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/aws-ssm

The CDK Construct Library for AWS::SSM


Version published
Weekly downloads
87K
decreased by-32.62%
Maintainers
5
Created
Weekly downloads
 

Package description

What is @aws-cdk/aws-ssm?

@aws-cdk/aws-ssm is an AWS Cloud Development Kit (CDK) library that allows you to interact with AWS Systems Manager (SSM) services. It provides constructs for defining and managing SSM parameters, documents, and associations within your CDK applications.

What are @aws-cdk/aws-ssm's main functionalities?

Create SSM Parameter

This feature allows you to create a new SSM parameter. The code sample demonstrates how to create a string parameter named 'myParameter' with the value 'myValue'.

const ssm = require('@aws-cdk/aws-ssm');
const cdk = require('@aws-cdk/core');

const app = new cdk.App();
const stack = new cdk.Stack(app, 'MyStack');

new ssm.StringParameter(stack, 'MyParameter', {
  parameterName: 'myParameter',
  stringValue: 'myValue',
});

app.synth();

Retrieve SSM Parameter

This feature allows you to retrieve an existing SSM parameter. The code sample demonstrates how to retrieve a string parameter named 'myParameter' and log its value.

const ssm = require('@aws-cdk/aws-ssm');
const cdk = require('@aws-cdk/core');

const app = new cdk.App();
const stack = new cdk.Stack(app, 'MyStack');

const parameter = ssm.StringParameter.fromStringParameterName(stack, 'MyParameter', 'myParameter');

console.log(parameter.stringValue);

Create SSM Document

This feature allows you to create a new SSM document. The code sample demonstrates how to create a document with a shell script that echoes 'Hello World'.

const ssm = require('@aws-cdk/aws-ssm');
const cdk = require('@aws-cdk/core');

const app = new cdk.App();
const stack = new cdk.Stack(app, 'MyStack');

new ssm.CfnDocument(stack, 'MyDocument', {
  content: JSON.stringify({
    schemaVersion: '2.2',
    description: 'My SSM Document',
    mainSteps: [
      {
        action: 'aws:runShellScript',
        name: 'exampleStep',
        inputs: {
          runCommand: ['echo Hello World']
        }
      }
    ]
  }),
  documentType: 'Command'
});

app.synth();

Other packages similar to @aws-cdk/aws-ssm

Changelog

Source

0.33.0 (2019-05-30)

IMPORTANT: apps created with the CDK version 0.33.0 and above cannot be used with an older CLI version.

Bug Fixes

  • core: Fn.cidr should return a list and not a string (#2678) (9d2ea2a), closes #2671
  • cli: fix ts-node usage on Windows (#2660) (5fe0af5)
  • cli: make cdk docs open the new API reference (#2633) (6450758)
  • cli: correctly pass build args to docker build (#2634) (9c58d6f)
  • core: hide dependencyRoots from public API (#2668) (2ba5ad2), closes #2348
  • autoscaling: move lifecycle hook targets to their own module (#2628) (b282132), closes #2447
  • codepipeline: no longer allow providing an index when adding a Stage to a Pipeline. (#2624) (ce39b12)
  • codepipeline-actions: correctly serialize the userParameters passed to the Lambda invoke Action. (#2537) (ceaf54a)
  • cx-api: improve compatibility messages for cli <=> app (#2676) (38a9894)
  • ecs: move high level ECS constructs into aws-ecs-patterns (#2623) (f901313)
  • logs: move log destinations into 'aws-logs-destinations' (#2655) (01601c2), closes #2444
  • s3: move notification destinations into their own module (#2659) (185951c), closes #2445

Features

BREAKING CHANGES TO EXPERIMENTAL FEATURES

  • logs: using a Lambda or Kinesis Stream as CloudWatch log subscription destination now requires an integration object from the @aws-cdk/aws-logs-destinations package.
  • codepipeline-actions: removed the addPutJobResultPolicy property when creating LambdaInvokeAction.
  • cli: --interactive has been removed
  • cli: --numbered has been removed
  • cli: --staging is now a boolean flag that indicates whether assets should be copied to the --output directory or directly referenced (--no-staging is useful for e.g. local debugging with SAM CLI)
  • assets: Assets (e.g. Lambda code assets) are now referenced relative to the output directory.
  • assert: SynthUtils.templateForStackName has been removed (use SynthUtils.synthesize(stack).template).
  • cx-api: cxapi.SynthesizedStack renamed to cxapi.CloudFormationStackArtifact with multiple API changes.
  • core: cdk.App.run() now returns a cxapi.CloudAssembly instead of cdk.ISynthesisSession.
  • s3: using a Topic, Queue or Lambda as bucket notification destination now requires an integration object from the @aws-cdk/aws-s3-notifications package.
  • autoscaling: using a Topic, Queue or Lambda as Lifecycle Hook Target now requires an integration object from the @aws-cdk/aws-autoscaling-hooktargets package.
  • codepipeline: the property atIndex has been removed from the StagePlacement interface.
  • aws-ecs: These changes move all L3 and higher constructs out of the aws-ecs module into the aws-ecs-patterns module. The following constructs have been moved into the aws-ecs-patterns module: EcsQueueWorkerService, FargateQueueWorkerService, LoadBalancedEcsService, LoadBalancedFargateService and LoadBalancedFargateServiceApplets.
  • cloudwatch: rename leftAxisRange => leftYAxis, rightAxisRange => rightYAxis, rename YAxisRange => YAxisProps.

Readme

Source

The CDK Construct Library for AWS Systems Manager

This module is part of the AWS Cloud Development Kit project.

Installation

Install the module:

$ npm i @aws-cdk/aws-ssm

Import it into your code:

import ssm = require('@aws-cdk/aws-ssm');

Using existing SSM Parameters in your CDK app

You can reference existing SSM Parameter Store values that you want to use in your CDK app by using ssm.ParameterStoreString:

using SSM parameter

Creating new SSM Parameters in your CDK app

You can create either ssm.StringParameter or ssm.StringListParameters in a CDK app. These are public (not secret) values. Parameters of type SecretString cannot be created directly from a CDK application; if you want to provision secrets automatically, use Secrets Manager Secrets (see the @aws-cdk/aws-secretsmanager package).

creating SSM parameters

When specifying an allowedPattern, the values provided as string literals are validated against the pattern and an exception is raised if a value provided does not comply.

Keywords

FAQs

Package last updated on 30 May 2019

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc