The goal of this document is submitting a job to AWS Batch and confirming the result in CloudWatch Logs.
Since I've worked on ap-northeast-1 region, The following examples includes this region name.
| /* | |
| Linuxカーネルのバージョンは2.6以上が前提 | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <signal.h> | |
| #include <errno.h> | |
| #include <stdarg.h> | 
| #!/bin/sh | |
| sleep 1 | |
| cat | 
| #!/bin/bash | |
| echo "---> sleep 0" | |
| for loop in `seq 10`; do awk 'BEGIN{ srand(); print rand() }'; done | |
| echo "---> sleep 0.5" | |
| for loop in `seq 10`; do awk 'BEGIN{ srand(); print rand() }'; sleep 0.5; done | |
| echo "---> sleep 1.0" | |
| for loop in `seq 10`; do awk 'BEGIN{ srand(); print rand() }'; sleep 1.0; done | |
| echo "---> srand(\$RANDOM)" | |
| for loop in `seq 10`; do awk 'BEGIN{ srand('"$RANDOM"'); print rand() }'; done | 
| #include <stdio.h> | |
| int | |
| main(void) | |
| { | |
| double answer = 0.1 + 0.1 + 0.1; | |
| if(answer == 0.3){ | |
| printf("True:%.100f\n", answer); | |
| } else { | 
| #!/bin/bash | |
| if [ $# -ne 2 ]; then | |
| echo "$0 [the number of insert] [output file]" | |
| exit 1 | |
| fi | |
| nmemb_insert=$1 | |
| ddlfile=$2 | |
| cat <<- EOF > $ddlfile | 
| # echo '{}' > event.json; mkdir -p libs; pip install attrs envattrs -t libs; \ | |
| # export YOUR_PREFIX_SLACK_CHANNEL=your_project-staging; \ | |
| # export YOUR_PREFIX_S3_BUCKET=pyconapac-bucket; \ | |
| # export YOUR_PREFIX_THRESHOLD=50; \ | |
| # python-lambda-local -l libs/ -f handler -t 5 lambda_pyconapac.py event.json | |
| from typing import Dict | |
| import attr | |
| import envattrs | 
| import base64 | |
| import datetime | |
| import gzip | |
| import json | |
| import sys | |
| import time | |
| from typing import Any, Dict, List | |
| import boto3 | 
The goal of this document is submitting a job to AWS Batch and confirming the result in CloudWatch Logs.
Since I've worked on ap-northeast-1 region, The following examples includes this region name.