Skip to content

Instantly share code, notes, and snippets.

{
"Type": "AWS::Logs::SubscriptionFilter",
"DependsOn": "LoggingLambdaPermission",
"Properties": {
"LogGroupName": "LogGroup",
"FilterPattern": "{ $.HaHaThisIsJson NOT EXISTS }",
"DestinationArn": {
"Fn::GetAtt": [
"LoghandlerLambdaFunction",
"Arn"
#!/bin/bash
source Shared.sh
aws elbv2 deregister-targets --target-group-arn $targetGroup --targets Id=$instanceId
describe-target-health $targetGroup $instanceId
aws elbv2 wait target-deregistered --target-group-arn $targetGroup --targets Id=$instanceId
describe-target-health $targetGroup $instanceId
#!/bin/bash
source Shared.sh
aws elbv2 register-targets --target-group-arn $targetGroup --targets Id=$instanceId
describe-target-health $targetGroup $instanceId
aws elbv2 wait target-in-service --target-group-arn $targetGroup --targets Id=$instanceId
describe-target-health $targetGroup $instanceId
describe-target-health() {
aws elbv2 describe-target-health --target-group-arn $1 --targets Id=$2
}
targetGroup=$( get_octopusvariable "AWSELBv2ARN" )
if [ -z "$targetGroup" ];
then
echo Target Group is missing
exit 1
fi
[Unit]
Description=SERVICENAME
[Service]
WorkingDirectory=#{Octopus.Action.Package.InstallationDirectoryPath}
ExecStart=#{Octopus.Action.Package.InstallationDirectoryPath}/SERVICENAME
Restart=always
RestartSec=10
User=ec2-user
Environment=HOSTNAME=#{Octopus.Machine.Name}
#!/bin/bash
packageId=$( get_octopusvariable "Octopus.Action.Package.PackageId" )
echo Package Id is $packageId
chmod +x $packageId
if [ -e /lib/systemd/system/$packageId.service ]
then
echo stopping service
tap "aws/tap"
tap "common-fate/granted"
tap "gjbae1212/gossm"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/cask-fonts"
tap "homebrew/cask-versions"
tap "homebrew/core"
tap "homebrew/services"
tap "tedsmitt/ecsgo"