This file contains 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
Resources: | |
QueueForLambda: | |
Type: 'AWS::SQS::Queue' | |
LambdaServiceRole: | |
Type: 'AWS::IAM::Role' | |
Properties: | |
AssumeRolePolicyDocument: | |
Statement: | |
- Action: 'sts:AssumeRole' | |
Effect: Allow |
This file contains 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
--- | |
Resources: | |
QueueForPipe: | |
Type: AWS::SQS::Queue | |
LambdaServiceRole: | |
Type: AWS::IAM::Role | |
Properties: | |
AssumeRolePolicyDocument: | |
Statement: | |
- Action: sts:AssumeRole |
This file contains 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
''' | |
Python PoC to interact with COROS Training Hub. | |
URL : https://training.coros.com/ | |
This script retrieves COROS's activity list for 2022/12. | |
$ python3 coros_activity_list.py | |
date,name,sportType,totalTime,distance,calorie,trainingLoad | |
20221230,Foo Run,100,9538,14651.11,1266085,117 |
This file contains 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 | |
# L@E logs are displayed or stored in the Region closest to the location where the function executed. | |
# This Bash script sets retention periods for CloudWatch Log in all regions. | |
FUNCTION_NAME=LambdaAtEdgeFunctionName | |
LOG_GROUP=/aws/lambda/us-east-1.${FUNCTION_NAME} | |
# Possible Values: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653. | |
RETENTION_IN_DAYS=30 |
This file contains 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
''' | |
Invalidate Amazon CloudFront paths | |
API | |
- https://docs.aws.amazon.com/cloudfront/latest/APIReference/API_CreateInvalidation.html | |
- https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/cloudfront.html#CloudFront.Client.create_invalidation | |
''' | |
import random | |
import time | |
import boto3 |
This file contains 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: "Backup Plan template for thin backups" | |
Resources: | |
BackupVaultWithThinBackups: | |
Type: "AWS::Backup::BackupVault" | |
Properties: | |
BackupVaultName: "BackupVaultWithThinBackups" | |
BackupPlanWithThinBackups: | |
Type: "AWS::Backup::BackupPlan" |
This file contains 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 | |
# simple shell script to demonstrate how EC2 Instance Connect CLI is implemented. | |
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstances.html | |
# | |
# Usage | |
# $ bash eic-cli.sh i-1234 | |
if [ $# -ne 1 ]; then | |
echo "Usage" | |
echo "$ bash eic-cli.sh i-1234" |
This file contains 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", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"rds-db:connect" | |
], | |
"Resource": [ | |
"arn:aws:rds-db:region:account-id:dbuser:dbi-resource-id/database-user-name" |
This file contains 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 python | |
# vim: set fileencoding=utf8 : | |
``` | |
$ pip install -U boto3 retrying | |
$ export AWS_DEFAULT_PROFILE=test | |
$ cat foo.sql | |
select count(*) | |
from bar | |
$ python athena.py foo.sql | |
$ ls -1 |
This file contains 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
// $ dot -Tpng kinesis-stream-state-diagram.dot -o kinesis-stream-state-diagram.png | |
digraph kinesis_stream_status { | |
labelloc="t"; | |
label="AWS Kinesis Streams : Stream State Diagram"; | |
CreateStream[shape=box]; | |
DeleteStream[shape=box]; | |
MergeShards[shape=box]; | |
SplitShards[shape=box]; | |
IncreaseStreamRetentionPeriod[shape=box]; |
NewerOlder