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
--- Create a database in your MySQL. Name it as HR. | |
CREATE DATABASE `HR`; | |
USE `HR`; | |
--- For the given/attached flat file, design a good database (in terms of different tables) for that dataset and migrate the data in the created database in 1 (use ETL or Data Wrangling tool). | |
CREATE TABLE Employee ( | |
Employee_Name VARCHAR(255), | |
EmpID INT(255), | |
Salary INT(255), | |
Termd VARCHAR(255), |
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
LambdaACM: | |
Type: AWS::Lambda::Function | |
Properties: | |
Code: | |
ZipFile: | | |
import boto3 | |
import cfnresponse | |
def handler(event, context): | |
acm = boto3.session.Session(region_name='us-east-1').client('acm') | |
static_site_domain = event['ResourceProperties']['StaticSiteDomain'] |
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
#!/usr/bin/env bash | |
set -x | |
role_session_name="$USER" | |
duration_seconds=3600 # 900-3600 | |
assume_role_arn="arn:aws:iam::<account-id>:role/<role-name>" | |
account_id="$(aws ec2 describe-security-groups | jq -r '.SecurityGroups[0].OwnerId')" |
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
from __future__ import print_function | |
import os | |
import boto3 | |
import pprint | |
import logging | |
import datetime | |
SPOT_FLEET_REQUEST_ID = os.environ['SpotFleetRequestId'] | |
SNS_TOPIC_ARN = os.environ['SnsTopicArn'] |
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
--- | |
- name: Test ec2_asg module | |
hosts: localhost | |
connection: local | |
gather_facts: false | |
tasks: | |
- name: ASG number changed | |
ec2_asg: | |
name: test | |
launch_config_name: test-lg6w4dojjvea3cvqvmn4kwbb5e |
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
--- | |
- name: Test gather_subset | |
hosts: localhost | |
connection: local | |
gather_facts: no | |
tasks: | |
- name: Setup | |
setup: | |
gather_subset: "!all" | |
- name: Debug |
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
--- | |
- name: Debug | |
debug: msg="outer item={{ outer_item }} inner item={{ item }}" | |
with_items: | |
- a | |
- b | |
- c |
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
--- | |
- name: Test debug strategy | |
hosts: localhost | |
connection: local | |
strategy: debug | |
tasks: | |
- name: Fail | |
fail: |
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
variable "region" { | |
default = "us-east-1" | |
} | |
provider "aws" { | |
region = "${var.region}" | |
} | |
resource "aws_cloudwatch_event_rule" "console" { | |
name = "capture-aws-sign-in" |
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
variable "name" { | |
default = "test" | |
} | |
variable "region" { | |
default = "ap-northeast-1" | |
} | |
variable "vpc_cidr" { | |
default = "172.16.0.0/16" |
NewerOlder