This file contains hidden or 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
| // src/App.js | |
| import React, { Component } from 'react'; | |
| import { Header } from 'semantic-ui-react'; | |
| class App extends Component { | |
| render() { | |
| return ( | |
| <div> | |
| <Header as='h1'>Hello World!</Header> |
This file contains hidden or 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
| #!/bin/bash -eu | |
| CLI_PROFILE=<your_cli_profile> | |
| credentials=$(aws sts get-session-token \ | |
| --serial-number <your-mfa-device-arn> \ | |
| --token-code $1 \ | |
| --profile $CLI_PROFILE \ | |
| --query "Credentials.[AccessKeyId, SecretAccessKey,SessionToken]" \ | |
| --output text) |
This file contains hidden or 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
| #!/bin/bash -eu | |
| CLI_PROFILE=<your_cli_profile> | |
| DEV_PROFILE=<you_dev_proffile> | |
| credentials=$(aws sts get-session-token \ | |
| --serial-number <your-mfa-device-arn> \ | |
| --token-code $1 \ | |
| --profile $CLI_PROFILE \ | |
| --query "Credentials.[AccessKeyId, SecretAccessKey,SessionToken]" \ |
This file contains hidden or 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": "Policy1559651007473", | |
| "Statement": [ | |
| { | |
| "Sid": "Stmt1559650947054", | |
| "Effect": "Deny", | |
| "Principal": "*", | |
| "Action": "s3:*", | |
| "Resource": "arn:aws:s3:::<your_bucket_name>/*", |
This file contains hidden or 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
| #!/bin/bash | |
| STACK_NAME=<your_stack_name> | |
| aws cloudformation create-stack \ | |
| --stack-name $STACK_NAME \ | |
| --template-url https://s3.amazonaws.com/cloudformation-stackset-sample-templates-us-east-1/AWSCloudFormationStackSetAdministrationRole.yml \ | |
| --capabilities CAPABILITY_NAMED_IAM \ | |
| --region us-east-1 | |
| aws cloudformation wait stack-create-complete --stack-name $STACK_NAME --region us-east-1 |
This file contains hidden or 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
| #!/bin/bash | |
| TARGET_ACCOUNT_ID=<target_account_id> | |
| MASTER_ACCOUNT_ID=<master_account_id> | |
| ROLE_NAME=OrganizationAccountAccessRole | |
| STACK_NAME=<your_stack_name> | |
| credentials=$(aws sts assume-role --role-session-name devdemo --role-arn arn:aws:iam::$TARGET_ACCOUNT_ID:role/$ROLE_NAME \ | |
| --query "Credentials.[AccessKeyId, SecretAccessKey,SessionToken]" \ | |
| --output text) |
This file contains hidden or 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
| WSTemplateFormatVersion: 2010-09-09 | |
| Description: Create S3 Bucket for Config | |
| Parameters: | |
| AuditS3BucketName: | |
| Type: String | |
| OrganizationId: | |
| Type: String | |
| Resources: |
This file contains hidden or 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
| AWSTemplateFormatVersion: 2010-09-09 | |
| Description: Enable AWS Config | |
| Parameters: | |
| AuditS3BucketName: | |
| Type: String | |
| OrganizationId: | |
| Type: String | |
| Resources: | |
| ServiceLinkedRoleForConfig: |
This file contains hidden or 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
| #!/bin/bash | |
| OPERATION_REGION=us-east-1 | |
| ROLE_NAME=OrganizationAccountAccessRole | |
| #Change your master account id | |
| MASTAR_ACCOUNT_ID=<YOUR_MASTER_ACCOUNT_ID> | |
| regions=$(aws ec2 describe-regions --query "Regions[].RegionName" --region $OPERATION_REGION --output text) | |
| function switch_role () { | |
| account_id=$1 |
This file contains hidden or 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
| #!/bin/bash | |
| OPERATION_REGION=us-east-1 | |
| ROLE_NAME=OrganizationAccountAccessRole | |
| #Change your master account id | |
| MASTAR_ACCOUNT_ID=<YOUR_MASTER_ACCOUNT_ID> | |
| regions=$(aws ec2 describe-regions --query "Regions[].RegionName" --region $OPERATION_REGION --output text) | |
| function delete_detector () { | |
| region=$1 |
OlderNewer