Questions tagged [aws-ssm]

AWS Systems Manager (formerly Amazon EC2 Systems Manager) is a unified interface that allows you to easily centralize operational data and automate tasks across your AWS resources.

AWS Systems Manager is a agent that can be installed and run on EC2 instances allow has various capabilities like running commands on these EC2 instances, help push data to Cloudwatch etc. Do take a look at http://docs.aws.amazon.com/systems-manager/latest/userguide/what-is-systems-manager.html for more info.

645 questions
26
votes
11 answers

AWS System Manager start session: An error occurred (TargetNotConnected) when calling the StartSession operation: is not connected

Problem: When I try to locally connect to a running EC2 instance using the AWS System Session Manager CLI command: aws ssm start-session --target i-123456 I get the error: An error occurred (TargetNotConnected) when calling the StartSession…
Marshallm
  • 965
  • 3
  • 20
  • 38
21
votes
3 answers

List all parameters in AWS SSM Parameter Store

How do I list all parameters in the AWS Systems Manager (SSM) Parameter Store? I am using the AWS CLI. I can store them with aws ssm put-parameter. I can fetch them with aws ssm get-parameter. I can list all documents with aws ssm list-documents,…
drhagen
  • 8,331
  • 8
  • 53
  • 82
20
votes
2 answers

Parameter store vs AppConfig

When should I use Parameter store for saving configuration vs AppConfig? For example, if I had to change the log level at run time, should that be stored in SSM or Appconfig? What are the pros and cons? What are the differences in these two,…
19
votes
2 answers

AWS Lambda "Unable to marshal response" Error

I am trying to setup an AWS lambda that will start an SSM session in my EC2 instance and run a command. For simplicity right now I am just trying to run ls. Here is my lambda function: import json import boto3 def lambda_handler(commands,…
dredbound
  • 1,579
  • 3
  • 17
  • 27
17
votes
6 answers

AWS SSM put parameter Validation Exception

I am getting error when I execute the below command. But as far as I have googled, I see the syntax is correct. Command 1: aws ssm put-parameter --name /Finance/Payroll/elixir3131 --value "P@sSwW)rd" --type SecureString Command 2: aws ssm…
vijaya lakshmi
  • 415
  • 1
  • 5
  • 24
13
votes
3 answers

Lambda Python to Query SSM Parameter Store Value

I want to write a Python 3.6 query in AWS Lambda to get details on an AWS SSM parameter store but I get a null response. If I query via AWS CLI I get the details on the parameter store item including the AMI ID which is my ultimate goal. The…
TIM02144
  • 593
  • 1
  • 4
  • 17
11
votes
7 answers

AWS System Manager GetParameters permission being implicitly denied

I am trying to setup eksctl for eks but it throwing "Error: unable to determine AMI to use: error getting AMI from SSM Parameter Store: AccessDeniedException: User: arn:aws:iam:::user/cnc is not authorized to perform: ssm:GetParameter on resource:…
Abhinav Kumar
  • 301
  • 1
  • 3
  • 13
11
votes
1 answer

SSM Secure reference is not supported in: AWS::EC2::Instance/Metadata

I am trying to use a SecureString in the meta data section of a cloud formation template but it raises the following error: SSM Secure reference is not supported in: …
10
votes
1 answer

How can I get output from boto3 ecs execute_command?

I have an ECS task running on Fargate on which I want to run a command in boto3 and get back the output. I can do so in the awscli just fine. ➜ aws ecs execute-command --cluster cluster1 \ …
theherk
  • 6,954
  • 3
  • 27
  • 52
10
votes
2 answers

AWS SSM Parametes GET using KMS decryption

Scenario: One of our scripts uses boto3 kms api to PUT and GET SSM parameters with KMS encryption and decryption. SSM param put works perfectly fine and parameters are added (with decryption as true) with secure string in the EC2 SSM param…
Vishal
  • 1,963
  • 2
  • 20
  • 23
9
votes
2 answers

Cross account access to SSM parameters

I followed the instructions mentioned in an AWS developer forum post (now no longer available). Policy { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor0", "Effect": "Allow", …
aspdeepak
  • 2,640
  • 2
  • 32
  • 37
8
votes
4 answers

AWS Patch Manager Fails on Ubuntu 22.04

UPDATE: As of Feb 1,2023 I paid the money and opened a ticket with AWS and this is the response.. Keep waiting: Reaching out to the internal team in terms of Patch Manager for Ubuntu 22.04, we were notified that the addition of Ubuntu 22.04 for…
Scott Dunt
  • 81
  • 4
8
votes
1 answer

Property validation failure: [Value of property {/Tags} does not match type {Map}] for AWS::SSM::Parameter in YAML

The following codesnippet: AWSTemplateFormatVersion: '2010-09-09' Description: Some CloudFormation template Resources: MyResourceName: Type: AWS::SSM::Parameter Properties: Name: myParameterName Type: String Value:…
Hadronymous
  • 566
  • 5
  • 16
8
votes
3 answers

Why am I getting an error when querying SSM parameters via get-parameters-by-path?

I am trying to query some SSM parameters by path (within Gitbash): aws --region eu-west-2 --profile some-profile ssm get-parameters-by-path --path /prefix/prefix2 There are a number of parameters that exist which match this prefix,…
John
  • 10,837
  • 17
  • 78
  • 141
8
votes
2 answers

Wait until a condition is met in bash script

until [ $(aws ssm get-automation-execution --automation-execution-id "$id" --query 'AutomationExecution.AutomationExecutionStatus' --output text) = *"InProgress"* ]; do echo "Automation is running......" sleep 1m done status=$(aws ssm…
chandra
  • 693
  • 3
  • 8
  • 21
1
2 3
42 43