There are two parts to this:
- Managing access to non-public S3 resources.
- Building RPM repositories in an automated, deterministic way that Yum can use.
In general, a CentOS 7 x86_64 box in AWS EC2; in specific, this Packer profile.
import requests | |
import time | |
import os | |
import json | |
import boto3 | |
import ipaddress | |
import socket | |
import base64 | |
import zlib | |
import datetime |
# first we download the list of IP ranges from CloudFlare | |
wget https://www.cloudflare.com/ips-v4 | |
# iterate over the lines in the downloaded file | |
# make sure to set `--group-id` and `--port`; more details at http://docs.aws.amazon.com/cli/latest/reference/ec2/authorize-security-group-ingress.html | |
while read p; do aws ec2 authorize-security-group-ingress --group-id sg-e0000000 --protocol tcp --port 80 --cidr $p; done< ips-v4 |
There are two parts to this:
In general, a CentOS 7 x86_64 box in AWS EC2; in specific, this Packer profile.
{ | |
"AWSTemplateFormatVersion":"2010-09-09", | |
"Description":"This Template creates an Amazon Cloudwatch Alert for Trusted Advisor open ports, protocols, IAM credentials not rotated in 90 days and must be created in us-east-1.", | |
"Parameters":{ | |
"EmailAddress": { | |
"Description": "Email Address for sending SNS notifications for TrustedAdvisor", | |
"Type": "String" | |
} | |
}, | |
"Resources":{ |
ansible --version | |
ansible 1.9.4 | |
configured module search path = None | |
$ cat requirements.yml | |
- src: [email protected]:roles/haproxy.git | |
version: master | |
name: haproxy-basic |
e.g Scenario AWS Dev Account: 111111111111 (ec2 instance) to access s3 service in PROD Account: 222222222222 | |
This is account that has ec2 instance: DEV | |
IAM User: test | |
Inline policy: | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", |