$ export ECS_CLUSTER_NAME={YOUR_ECS_CLUSTER_NAME}
$ export ECS_SERVICE_NAME={YOUR_ECS_SERVICE_NAME}
This file contains hidden or 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 bash | |
set -eu | |
aws ecs list-clusters \ | |
| jq -r '.clusterArns[]' \ | |
| xargs -I '{}' aws ecs update-cluster-settings --cluster '{}' --settings name=containerInsights,value=enabled |
This file contains hidden or 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: It's time to redemption | |
Resources: | |
# これが罪深くも過去に手で作られた IAM ユーザー (Import の対象) | |
MyHandCraftedIAMUser: | |
Type: AWS::IAM::User | |
DeletionPolicy: Retain | |
# こちらは CFn でちゃんと作る IAM グループ | |
MyCFnCreatedIAMGroup: |
This file contains hidden or 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
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. | |
# SPDX-License-Identifier: Apache-2.0 | |
AWSTemplateFormatVersion: 2010-09-09 | |
Description: CloudFormation template that represents a request driven web service on AWS App Runner. | |
Parameters: | |
AppName: | |
Type: String | |
EnvName: | |
Type: String | |
WorkloadName: |
This file contains hidden or 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
// ==UserScript== | |
// @name AWS Containers please 🙏 | |
// @namespace https://aws.amazon.com | |
// @include /^https:\/\/[a-z0-9.-]*console\.aws\.amazon\.com\/.*$/ | |
// @version 0.0.1 | |
// @author toricls | |
// ==/UserScript== | |
(function() { | |
window.setTimeout(update, 1000); |
This file contains hidden or 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": "1.0", | |
"Comment": "Run AWS Fargate task", | |
"TimeoutSeconds": 900, | |
"StartAt": "Run Fargate Task", | |
"States": { | |
"Run Fargate Task": { | |
"Type": "Task", | |
"Resource": "arn:aws:states:::ecs:runTask.sync", | |
"Parameters": { |
This file contains hidden or 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
set theDate to do shell script "date +%Y_%m_%d_%H%M%S" | |
set theDirectory to POSIX path of (path to desktop) | |
set thePath to theDirectory & "screenCapture_" & theDate & ".png" | |
# -R557,308,810,513 is the rectangle option: x,y,w,h | |
do shell script "screencapture -R557,308,810,513 -tpng" & space & quoted form of thePath |
This file contains hidden or 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
FROM amazonlinux:2 | |
RUN yum -y update \ | |
# systemd is not a hard requirement for Amazon ECS Anywhere, but the installation script currently only supports systemd to run. | |
# Amazon ECS Anywhere can be used without systemd, if you set up your nodes and register them into your ECS cluster **without** the installation script. | |
&& yum -y install systemd \ | |
&& yum clean all | |
RUN cd /lib/systemd/system/sysinit.target.wants/; \ | |
for i in *; do [ $i = systemd-tmpfiles-setup.service ] || rm -f $i; done |
This file contains hidden or 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
FROM ubuntu:20.04 | |
RUN set -ex \ | |
&& apt update \ | |
&& apt install --no-install-recommends -y \ | |
ca-certificates curl docker.io \ | |
# systemd is not a hard requirement for Amazon ECS Anywhere, but the installation script currently only supports systemd to run. | |
# Amazon ECS Anywhere can be used without systemd, if you set up your nodes and register them into your ECS cluster **without** the installation script. | |
systemd init \ | |
&& rm -rf /var/lib/apt/lists/* \ |