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 ruby | |
require 'json' | |
def read_json(file_name) | |
JSON.parse(File.read(file_name)) | |
end | |
def parse(iam) | |
result = [] |
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
diff --git a/books/ecspresso-handbook/codedeploy.md b/books/ecspresso-handbook/codedeploy.md | |
index 7204de5..e68c4ea 100644 | |
--- a/books/ecspresso-handbook/codedeploy.md | |
+++ b/books/ecspresso-handbook/codedeploy.md | |
@@ -185,9 +185,9 @@ https://docs.aws.amazon.com/ja_jp/AmazonECS/latest/userguide/deployment-type-blu | |
Blue/Green デプロイを設定したサービスは、オートスケーリングが有効な状態ではデプロイが行えません。 | |
-`ecspresso deploy --suspend-autoscaling` を指定することで、デプロイ前に Application Autoscaling を一時的に停止できます。 | |
+`ecspresso deploy --suspend-auto-scaling` を指定することで、デプロイ前に Application Autoscaling を一時的に停止できます。 |
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
aws ecs describe-task-definition --task-definition ecspresso-test --include TAGS | jq '. | {containerDefinitions:.taskDefinition.containerDefinitions, cpu:.taskDefinition.cpu, executionRoleArn:.taskDefinition.executionRoleArn, family:.taskDefinition.family, memory:.taskDefinition.memory, networkMode:.taskDefinition.networkMode, placementConstraints:.taskDefinition.placementConstraints, requiresCompatibilities:.taskDefinition.requiresCompatibilities, taskRoleArn:.taskDefinition.taskRoleArn, proxyConfiguration:.taskDefinition.proxyConfiguration, volumes:.taskDefinition.volumes, tags:.tags}' |
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
orbs: | |
aws-cli-v2: | |
commands: | |
install: | |
steps: | |
- run: | | |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | |
unzip awscliv2.zip | |
sudo ./aws/install |
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
<match *-firelens-*> | |
@type firelens_tag_filter | |
</match> | |
<match app.firelens.**> | |
# ... | |
</match> |
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 perl | |
use 5.12.1; | |
use warnings; | |
use JSON::PP; | |
my $file = shift; | |
open my $in, "<", $file or die $!; | |
my $taskdef = JSON::PP::decode_json(do { local $/ = undef; <$in> }); | |
my $g = $file; |
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/perl | |
use strict; | |
use warnings; | |
use utf8; | |
use 5.014; | |
use Encode; | |
use JSON::PP qw/encode_json decode_json/; | |
use Sys::Hostname; | |
use IPC::Open2; |
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
exports.handler = async (event, context, callback) => { | |
const response = { | |
status: "302", | |
statusDescription: "Found", | |
headers: { | |
location: [{ | |
key: 'Location', | |
value: 'http://contents.xj-storage.jp/xcontents/AS01527/ec0b38f1/7c8b/4dbc/89e1/106de9ea3108/20190108140352250s.pdf', | |
}], | |
} |
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
package main | |
import ( | |
"context" | |
"encoding/json" | |
"errors" | |
"log" | |
"os" | |
"time" |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"os" | |
"time" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/session" |
NewerOlder