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
$ mkdir ~/check-iam-users | |
$ sudo pip install slackweb -t ./check-iam-users/ | |
$ cd check-iam-users/ && ls | |
slackweb slackweb-1.0.5-py2.7.egg-info |
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
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
import boto3 | |
import time | |
import calendar | |
import slackweb | |
print('Loading function') | |
# Webhook |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Sign Up</title> | |
<!-- aws sdk //--> | |
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.3.8.min.js"></script> | |
<!-- aws cognito sdk(beta)と必要なライブラリ //--> | |
<script src="***/jsbn.js"></script> |
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
// Cognito User Pool Id | |
AWSCognito.config.region = 'us-east-1'; | |
AWSCognito.config.credentials = new AWS.CognitoIdentityCredentials({ | |
IdentityPoolId: 'us-east-1:a999fc0e-b*************5d4fb6ffa' | |
}); | |
AWS.config.region = 'us-east-1'; | |
AWS.config.credentials = new AWS.CognitoIdentityCredentials({ | |
IdentityPoolId: 'us-east-1:a999fc0e-b*************5d4fb6ffa' | |
}); |
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
{ | |
"version": "1.0", | |
"invokingEvent": "{ | |
\"configurationItemDiff\":{}, | |
\"configurationItem\":{ | |
\"configurationItemVersion\":\"1.2\", | |
\"relatedEvents\":[\"a46a2a05-b61d-4e01-903c-c396001b6150\"], | |
\"relationships\":[], | |
\"configuration\":{}, | |
\"supplementaryConfiguration\":{}, |
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
Slash CommandでSlackのChannelにAWS CLIのコマンド(message)を送ったら、 | |
そのAWS CLIのコマンドがAPI Gateway経由でLambdaに送られ、 | |
Lambdaが送信されたAWS CLIのコマンドを実行して、実行結果をSlackに返す |
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
R セキュリティ対策により防げた損失 (想定できない) | |
- | |
I セキュリティ投資 (取り出せない) |
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
AWS ConfigはAWSリソースの構成情報を自動的に収集してくれるサービスです。 | |
監査、セキュリティ性の維持、トラブルシューティングなどに使えます。 | |
AWS Configを人間に例えると、情報収集者です。 |
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
{ | |
"Version": "2012-10-17", | |
"Id": "Policy146935390****", | |
"Statement": [ | |
{ | |
"Sid": "Stmt146935390****", | |
"Effect": "Deny", | |
"Principal": { | |
"AWS": "arn:aws:iam::2847****1948:user/test-user1" | |
}, |
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
$ sudo yum update -y |
OlderNewer