This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: "Systems Manager Association" | |
Resources: | |
Association: | |
Type: AWS::SSM::Association | |
Properties: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
AWSTemplateFormatVersion: '2010-09-09' | |
Description: Simple S3 Bucket with SNS Trigger | |
Parameters: | |
BucketName: | |
Type: String | |
Description: The name of the S3 Bucket to create |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-AWSCommandsFromFile { | |
[CmdletBinding()] | |
param ( | |
[ValidateScript({Test-Path -Path $_ -PathType Leaf})] | |
$FilePath | |
) | |
$awsCommands = @{} | |
$tokens = [System.Management.Automation.PSParser]::Tokenize((Get-Content -Path $FilePath -Raw), [ref]$null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-AWSRegionLatency { | |
param ( | |
[ValidateSet('dynamodb')] | |
[String] $ServiceForMeasurement = 'dynamodb' | |
) | |
$endpoints = [System.Collections.ArrayList]::new() | |
$regions = (Get-AWSRegion | Where-Object {$_.Region -notlike 'us-iso*'}).Region | |
foreach ($region in $regions) { | |
$null = $endpoints.Add(('{0}.{1}.amazonaws.com' -f $ServiceForMeasurement, $region)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Overview | |
This Gist provides samples to simplify the usage of the AWS Systems Manager Document, "AWS-ApplyDSCMofs". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-EpochTimeFrom { | |
param ( | |
[int]$Seconds | |
) | |
(Get-Date -Date '01-01-1970') + ([System.TimeSpan]::FromSeconds($Seconds)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingCmdletAliases', '')] | |
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingPlainTextForPassword', '')] | |
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSAvoidUsingWriteHost', '')] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This has been replaced by the FastPing PowerShell Module. | |
## Source | |
[GitHub](]https://github.com/austoonz/FastPing) | |
## Installation | |
```powershell | |
Install-Module -Name FastPing -Scope CurrentUser |
NewerOlder