Help us understand the problem. What is going on with this article?

[やってみた]AWS EC2にCloudMapperを構築

環境

AWS EC2 Amazon Linux 2 AMI

構築手順

アクセスキーの取得

[IAM]-[ユーザ]-[ユーザ名]-[認証情報]より、アクセスキーを作成し、アクセスキーとシークレットアクセスキーを控える

CloudMapperの取得と配置

$ sudo yum install git -y
$ git clone https://github.com/duo-labs/cloudmapper.git

$ sudo yum install autoconf automake libtool python34-devel jq -y
$ sudo yum install python3.x86_64 python3-tkinter.x86_64  python3-devel.x86_64 python3-pip.noarch -y

nginxのインストール

$ sudo amazon-linux-extras install nginx1.12 -y
$ sudo systemctl enable nginx
$ sudo systemctl start nginx

Pythonモジュールのインストール

$ sudo pip3 install pyyaml
$ sudo pip3 install parliament
$ sudo pip3 install pyjq
$ sudo pip3 install netaddr
$ sudo pip3 install policyuniverse
$ sudo pip3 install jinja2

AWS CLIの環境設定

$ aws configure
AWS Access Key ID [None]: アクセスキー
AWS Secret Access Key [None]: シークレットアクセスキー
Default region name [None]: リージョン名(英語)
Default output format [None]: json

リージョン、アベイラビリティーゾーン、および ローカルゾーン

CloudMapperの初期設定

$ cd cloudmapper
$ AWS_ID=$(aws sts get-caller-identity \
    --query "Account" \
    --output text) \
    && echo ${AWS_ID}

$ python3 cloudmapper.py configure add-account --config-file config.json --name dev.io --id ${AWS_ID} --default DEFAULT
$ python3 cloudmapper.py configure add-account --config-file config.json --name demodemo --id ${AWS_ID}

利用方法

構成情報の取得

$ python3 cloudmapper.py collect --config config.json --account demodemo
$ python3 cloudmapper.py prepare --config config.json --account demodemo

アクセス

http://ec2-xxx.xxx.xxx.xxx.ap-northeast-1.compute.amazonaws.com/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした