All technological notes.
AWS Systems ManagerAWS Systems Manager
AWS Systems Manager Parameter Store / SSM Parameter Store
Features:
Integration:
KMSIAMEventBridgeCloudFormation


TTL to a parameter (expiration date) to force updating or deleting sensitive data such as passwords








aws ssm get-parameters --names /my-app/dev-pwd /my-app/dev-url

# GET PARAMETERS WITH DECRYPTION
aws ssm get-parameters --names /my-app/dev-pwd /my-app/dev-url --with-decryption

# GET PARAMETERS BY PATH
aws ssm get-parameters-by-path --path /my-app/dev/

# GET PARAMETERS BY PATH WITH DECRYPTION
aws ssm get-parameters-by-path --path /my-app/ --recursive --with-decryption



import json
import boto3
import os
ssm = boto3.client('ssm', region_name="us-east-1")
app_name = os.environ['APP_NAME']
def lambda_handler(event, context):
db_url = ssm.get_parameters(Names=[app_name + "/dev-url"])
print(db_url)
db_password = ssm.get_parameters(Names=[app_name + "/dev_pwd"], WithDecryption=True)
print(db_password)
return "worked!"










Session Manager
EC2 and on-premises serversFeatures
S3 or CloudWatch Logs












Run Command
Features:
SSHIntegration
AWS Console, sent to S3 bucket or CloudWatch LogsSNS about command status (In progress, Success, Failed, …)IAM & CloudTrailEventBridge
Patch Manager
Features:
EC2 instances and on-premises serversMaintenance Windows
Maintenance Windows
Maintenance Window contains

Automation
AMI, EBS snapshotAutomation Runbook
Can be triggered using:
Console, AWS CLI or SDKEventBridgeMaintenance WindowsConfig for rules remediations