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
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"s3:GetObject", | |
"s3:GetObjectVersion", | |
"s3:GetBucketVersioning" | |
], | |
"Resource": "*", | |
"Effect": "Allow" |
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
{ | |
"Statement": [ | |
{ | |
"Action": [ | |
"s3:GetObject", | |
"s3:GetObjectVersion", | |
"s3:GetBucketVersioning" | |
], | |
"Resource": "*", | |
"Effect": "Allow" |
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
files: | |
"/home/ec2-user/sourceenvname.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/bin/bash | |
export AWS_DEFAULT_REGION=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | sed -e 's/[a-z]$//') | |
instance_id=$(curl -s http://169.254.169.254/latest/meta-data/instance-id) | |
ebenvname=$(aws --output text ec2 describe-tags --filters "Name=resource-id,Values=${instance_id}" "Name=key,Values=elasticbeanstalk:environment-name" | awk '{print $5}') |
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
files: | |
"/etc/httpd/conf.d/proxy-pass.conf": | |
mode: 000644 | |
owner: root | |
group: root | |
content: | | |
<Location /socket> | |
ProxyPass ws://127.0.0.1:8081/ | |
ProxyPassReverse ws://127.0.0.1:8081/ | |
</Location> |
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
commands: | |
01_replaceTimeout: | |
command: sed -i 's/keepalive_timeout 65;/keepalive_timeout 600;/g' /etc/nginx/nginx.conf | |
02_replaceTimeout: | |
command: sed -i 's/keepalive_timeout 65;/keepalive_timeout 600;/g' /etc/nginx/nginx.conf.default |
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
commands: | |
01_replaceTimeout: | |
command: sed -i 's/keepalive_timeout 65;/keepalive_timeout 600;/g' /etc/nginx/nginx.conf |
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
Resources: | |
AWSEBLoadBalancer: | |
Type: AWS::ElasticLoadBalancing::LoadBalancer | |
Properties: | |
ConnectionSettings: | |
IdleTimeout: 300 |
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
found=`fgrep -c 'NEWRELIC_INFRA="1"' /opt/elasticbeanstalk/support/envvars` | |
echo $found | |
if [ $found -eq 1 ]; then | |
echo 'NEWRELIC_INFRA is set' | |
else | |
echo "uninstalling newrelic-infra if already installed..." | |
fi |
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
found=`fgrep -c 'NEWRELIC_INFRA="1"' /opt/elasticbeanstalk/support/envvars` | |
echo $found | |
if [ $found -eq 1 ]; then | |
echo "uninstalling newrelic-infra if already installed..." | |
else | |
echo 'NEWRELIC_INFRA is set' | |
fi |
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
import boto3 | |
import botocore | |
import os | |
import json | |
def spokevgw_handler(event, context): | |
vpngatewayids1 = [] | |
vpnconnections = [] | |
vgwtag = [] | |
newvpcconnection = [] | |
processfilenames = [] |
NewerOlder