Skip to content

Instantly share code, notes, and snippets.

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
import boto3
import datetime
def lambda_handler(event, context):
d = datetime.datetime.now()
date = d.strftime("%Y-%m-%d")
logs = 'error/postgresql.log.' + date
rds_client = boto3.client('rds')
@msato0731
msato0731 / AWS_SG_Cloudformation_default.yaml
Last active June 19, 2018 22:13
AWS_SG_Cloudformation_default
AWSTemplateFormatVersion: 2010-09-09
Resources:
VPC:
Type: 'AWS::EC2::VPC'
Properties:
CidrBlock: 172.16.0.0/16
EnableDnsSupport: true
EnableDnsHostnames: true
InstanceTenancy: default
Tags:
@msato0731
msato0731 / AWS_SG_Cloudformation_addOutboud.yaml
Created June 19, 2018 22:24
AWS_SG_Cloudformation_addOutboud.yaml
AWSTemplateFormatVersion: 2010-09-09
Resources:
VPC:
Type: 'AWS::EC2::VPC'
Properties:
CidrBlock: 172.16.0.0/16
EnableDnsSupport: true
EnableDnsHostnames: true
InstanceTenancy: default
Tags:
# VPC
AWSTemplateFormatVersion: 2010-09-09
Parameters:
ProjectId:
Description: "Project name id."
Type: String
AllowedPattern: '^[a-zA-Z0-9-/:-@\[-\`\{-\~]+$'
ConstraintDescription: "InvalidValue[ProjectId]"
Default: cfn
EnvironmentType:
# VPC
AWSTemplateFormatVersion: 2010-09-09
Resources:
VPC:
Type: "AWS::EC2::VPC"
Properties:
CidrBlock: 10.0.0.0/16
EnableDnsSupport: true
EnableDnsHostnames: true
InstanceTenancy: "default"
---
- hosts: all
become: yes
vars_files:
- var.yaml
tasks:
- name: add a admin group
group: name=admin state=present
- name: add a new user
'use strict';
var Alexa = require('alexa-sdk');
var APP_ID = process.env.ALEXA_APP_ID;
var SKILL_NAME = "ベンチプレス計算";
var HELP_MESSAGE = "重量と回数からベンチプレスの最大重量を計算します。";
var HELP_REPROMPT = "重量を教えてください";
var START_MESSAGE = "重量と回数からベンチプレスの最大重量を計算します。重量をkgで教えてください。";
var STOP_MESSAGE = "さようなら";
@msato0731
msato0731 / terraform.tfvars
Last active December 7, 2018 22:55
trraform入門 tfvars
access_key = "***********************"
secret_key = "***********************"
region = "ap-northeast-1"
@msato0731
msato0731 / main.tf
Created December 7, 2018 22:56
terraform 入門 
variable "access_key" {}
variable "secret_key" {}
variable "region" {}
provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "${var.region}"
}