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
{ | |
"configurations": [ | |
{ | |
"name": "Jest file", | |
"type": "pwa-node", | |
"request": "launch", | |
"runtimeExecutable": "${workspaceRoot}/node_modules/.bin/jest", | |
"args": [ | |
"${fileBasenameNoExtension}", | |
"--runInBand", |
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 quicksight register-user --region us-east-1 --aws-account-id 1234567890 \ | |
--identity-type IAM --email xx@example.com --user-role ADMIN --namespace default \ | |
--session-name ClickstreamExploreUser \ | |
--iam-arn arn:aws:iam::1234567890:role/clickstream-v12-dev-ClickStreamApiQuickSightEmbedRo-yQ90NyWORHnq |
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
# install tools | |
pip3 install certbot acme certbot-dns-route53 | |
# | |
export DOMAIN_NAME=clickstream.example.com | |
export CERT_NAME=$DOMAIN_NAME-$(/bin/date +%s) | |
# request fress SSL cert via DNS chanllege | |
certbot certonly --dns-route53 -d $DOMAIN_NAME --email your-mail@example.com --agree-tos --non-interactive --work-dir ./ --logs-dir ./ --config-dir ./ -v |
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
import { DescribeParametersCommand, SSMClient } from "@aws-sdk/client-ssm"; | |
import { UserAgent } from '@aws-sdk/types'; | |
import * as log4js from "log4js"; | |
log4js.configure({ | |
appenders: { out: { type: "stdout" } }, | |
categories: { default: { appenders: ["out"], level: "debug" } }, | |
}); | |
const logger = log4js.getLogger(); |
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
npx license-report --fields=name --fields=licenseType --only=prod --output=csv --delimiter=" under the " --package=/path/to/package.json |
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 cloudformation create-stack --template-url https://bucketname.s3.cn-north-1.amazonaws.com.cn/tmp/pipeline.yml --parameters ParameterKey=PipelineType,ParameterValue=Feature ParameterKey=ContainerImageSupport,ParameterValue=true ParameterKey=IsRepositoryExist,ParameterValue=true ParameterKey=RepositoryName,ParameterValue=clickstream-branch-main ParameterKey=RepositoryDescription,ParameterValue=xxx ParameterKey=BranchName,ParameterValue=ingestion-server-del-ecs --capabilities CAPABILITY_IAM --stack-name v5-test |
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
const cloudFrontS3 = new CloudFrontToS3(this, 'control-plane', { | |
insertHttpSecurityHeaders: false, | |
cloudFrontDistributionProps: { | |
comment: 'It is managed by ServerlessTODO app.', | |
minimumProtocolVersion: SecurityPolicyProtocol.TLS_V1_2_2019, | |
httpVersion: HttpVersion.HTTP2_AND_3, | |
additionalBehaviors: { | |
['/prod/*']: { | |
origin: new HttpOrigin(Fn.select(2, Fn.split('/', api.url)), { | |
protocolPolicy: OriginProtocolPolicy.HTTPS_ONLY, |
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 | |
set -euxo pipefail | |
BUCKET=aws-gcr-solutions-assets | |
mirror-helm() { | |
local repoName=$1 | |
local chartName=$2 |
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 logs put-resource-policy --policy-name AWSLogDeliveryWrite20150319 \ | |
--policy-document ' | |
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AWSLogDeliveryWrite", | |
"Effect": "Allow", | |
"Principal": { | |
"Service": "delivery.logs.amazonaws.com" |
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
# set kubeconfig for your kind cluster | |
export KUBECONFIG=$HOME/.kube/kind | |
# create kind cluster | |
kind create cluster --name gitops | |
# provisioning flux | |
flux install --components-extra=image-reflector-controller,image-automation-controller --export > gotk-components.yaml | |
cat <<EOF > kustomization.yaml | |
apiVersion: kustomize.config.k8s.io/v1beta1 |
NewerOlder