Skip to content

Instantly share code, notes, and snippets.

--- 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),
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']
#!/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')"
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']
---
- 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
---
- name: Test gather_subset
hosts: localhost
connection: local
gather_facts: no
tasks:
- name: Setup
setup:
gather_subset: "!all"
- name: Debug
---
- name: Debug
debug: msg="outer item={{ outer_item }} inner item={{ item }}"
with_items:
- a
- b
- c
---
- name: Test debug strategy
hosts: localhost
connection: local
strategy: debug
tasks:
- name: Fail
fail:
variable "region" {
default = "us-east-1"
}
provider "aws" {
region = "${var.region}"
}
resource "aws_cloudwatch_event_rule" "console" {
name = "capture-aws-sign-in"
variable "name" {
default = "test"
}
variable "region" {
default = "ap-northeast-1"
}
variable "vpc_cidr" {
default = "172.16.0.0/16"