Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View austoonz's full-sized avatar

Andrew Pearce austoonz

View GitHub Profile
@austoonz
austoonz / Write-SSMComplianceItemExample
Last active April 5, 2019 22:31
Sample code for writing an AWS Systems Manager Compliance Item.
$managedInstanceId = (Get-Content -Path 'C:\ProgramData\Amazon\SSM\InstanceData\Vault\Store\RegistrationKey' -Raw | ConvertFrom-Json).instanceID
$moduleNames = @(
'AWSPowerShell',
'ClipboardText',
'Convert',
'PSWindowsUpdate'
)
$complianceItems = [System.Collections.Generic.List[Amazon.SimpleSystemsManagement.Model.ComplianceItemEntry]]::new()
foreach ($moduleName in $moduleNames)
brew cask install quicklook-json
(Get-Item -Path 'HKLM:\SOFTWARE\Microsoft\Virtual Machine\Guest\Parameters').GetValue('HostName')
@austoonz
austoonz / Lambda-SQS-Trigger
Last active January 15, 2019 03:38
A CloudFormation template sample to subscribe an AWS Lambda Function to an SQS Queue.
---
AWSTemplateFormatVersion: '2010-09-09'
Description: SQS Queue with Lambda Trigger
Parameters:
LambdaS3BucketName:
Type: String
Description: S3 Bucket Name holding the Lambda Function Package
@austoonz
austoonz / SQS-SNS-Subscription
Last active January 23, 2024 22:35
A CloudFormation template sample to subscribe an SQS Queue to an SNS Topic.
---
AWSTemplateFormatVersion: '2010-09-09'
Description: SQS Queue subscribed to an SNS Topic
Parameters:
SourceSNSTopicArn:
Type: String
Description: SNS Topic Arn to subscribe the SQS Queue to
@austoonz
austoonz / Simple-S3Bucket-SNS
Last active February 9, 2024 02:38
A CloudFormation template sample for creating an S3 Bucket with an SNS Trigger.
---
AWSTemplateFormatVersion: '2010-09-09'
Description: Simple S3 Bucket with SNS Trigger
Parameters:
BucketName:
Type: String
Description: The name of the S3 Bucket to create
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingCmdletAliases', '')]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '')]