aws ecr new account docker push policy

1. IAM User -> New User -> Demo_ECR Add Permissions policies 新增許可 a. 直接連接現有政策 AmazonEC2ContainerRegistryPowerUser b. 建立policies -> Demo_ECR https://docs.aws.amazon.com/AmazonECR/latest/userguide/security-iam-awsmanpol.html 2. install aws cli tools windows https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-windows.html 3. aws ecr repositories -> private -> create repository input demo Keep ooxxooxxooxxooxx.dkr.ecr.ap-northeast-1.amazonaws.com/demo save 4. aws cli login powershell windows aws configure go back IAM, show Demo_ECR -> 安全登入資料 security login run 建立存取金鑰 create Access Key copy new Access Key ID and AWS Secret Access Key ...

2021-09-30 · 1 min · 209 words · Me

serveless aws gcp speed

This problem, let me think my stupid manager and Smart Information Security Consultant before company. Information Security Consultant Say GCP is very safe… Ya safe so customer lose.

2020-12-06 · 1 min · 28 words · Me

linux aws s3 exploer crossftp

https://www.tecmint.com/nginx-web-server-security-hardening-and-performance-tips/?fbclid=IwAR3WRK-N-buun8QIMDUbzes72-w6p8SKCxnzr0sGU_PFAyudPRbHiumtFu0

2019-04-23 · 1 min · word · Me

bbr Kernel 4.9.51

aws linux 官方 https://aws.amazon.com/tw/amazon-linux-ami/2017.09-release-notes/ ubuntu https://segmentfault.com/a/1190000008395823 https://farer.org/2017/05/18/build-kernel-with-bbr-on-ec2-amazon-linux/ 修改/etc/sysctl.conf文件,加入如下两行: net.core.default_qdisc = fq net.ipv4.tcp_congestion_control = bbr 檢查 cat /proc/sys/net/ipv4/tcp_congestion_control

2017-11-17 · 1 min · 17 words · Me

Port Forwarding Gateway via iptables on Linux

1、 http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_NAT_Instance.html#NATSG 1.1、Create instance form ami :ami-vpc-nat-hvm choese best new ***NAT AMI*** 1.2、 Check.IPv4 forwarding is enabled and ICMP redirects are disabled in /etc/sysctl.d/10-nat-settings.conf IPv4 forwarding =1 Run.A script located at /usr/sbin/configure-pat.sh runs at startup and configures iptables IP masquerading. Here have problem, so must delete POSTROUTING sudo iptables -t nat -D POSTROUTING 1 2、 https://holtstrom.com/michael/blog/post/400/Port-Forwarding-Gateway-via-iptables-on-Linux.html eth0 10.0.0.219 52.78.165.129 eth1 10.0.1.149 web server 10.0.1.249 iptables -vxnL –line-numbers iptables -t nat -vxnL –line-numbers ...

2017-11-01 · 2 min · 235 words · Me

aws linux partition resize

http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/UserGuide/ebs-expand-volume.html#recognize-expanded-volume-linux 1、AWS console EC2 resizse 2、login EC2 2.1、 lsblk get info to disk size. Is resize ok? 2.2 resize2fs /dev/xvda1 If 2.2 finish, then resize faild. follow 2.3 2.3 parted /dev/xvda 2.3.1 parted> print all -> get disk real size 2.3.2 parted> resizepart 2.3.3 parted> 1 2.3.4 parted End?>put size is 2.3.1 2.3.5 parted>exit then 2.2 again. If ok then 2.1 check age. PS: 2.3.4 End?> -1 -1 最大磁碟空間

2017-08-01 · 1 min · 69 words · Me

go aws ec2 control

package main import ( “fmt” “log” “net/http” “io/ioutil” “github.com/gorilla/mux” “github.com/smartystreets/go-aws-auth” ) func stopEC2InstanceHandler(w http.ResponseWriter, req *http.Request) { vars := mux.Vars(req) w.Write([]byte(fmt.Sprintf(“stopEC2InstanceHandler: %v \n\n”, vars[“id”]))) var Action = “StopInstances” //check aws website var Version = “2016-11-15” //need to check api version from aws website //regoin need to check url from aws website. ex: ap-northeast-2 //some region no support some action apiUrl := “https://ec2.ap-northeast-2.amazonaws.com/?Action=" + Action + “&Version=” + Version + “&InstanceId.1=” + vars[“id”] client := new(http.Client) ...

2017-07-25 · 1 min · 202 words · Me

aws ami snapshot 備份

參考網路上的修改過 https://simplyopensource.blogspot.tw/2014/04/script-to-create-daily-ami-of-aws.html https://github.com/colinbjohnson/aws-missing-tools/blob/master/ec2-automate-backup/ec2-automate-backup.sh 使用指令 amibackup.sh -i i-0102e3b13418794d4 -r ap-northeast-2 -d 1 » /root/ami_backup/AmiBackupLog.log 2>&1 #!/bin/bash # ReadMe - How to use this script # cyfbackup.sh -r [region] -i [instance name] # -d [How may days ago to delete] -t [emulate today is how many days ago] #Define TextColor Varible to use #TextRedBgYellow="\e[0;31;43m" TextGreen="\e[0;32m" TextRed="\e[0;31m" TextYellow="\e[0;33m" TextBlue="\e[0;36m" EndText="\e[0m" #Define test_day for Emulate Today is some days ago. declare -i test_day=0 #get Paramenter -d beforeDay2Del, -i InstanceID, -r Region while getopts :d:i:r:t:end opt; do case $opt in d) remainDay=$OPTARG;; i) instance_id=$OPTARG;; r) region=$OPTARG;; t) test_day=$OPTARG;; *) echo “Option is invalid, Please check.”; exit 1;; esac done ...

2017-05-23 · 5 min · 877 words · Me

Schedule daily AMI of AWS [轉]Automate EBS Volume Backups – AWS Cli+Bash

https://www.linuxtutorial.co.uk/automate-ebs-volume-backups-bash/ https://github.com/colinbjohnson/aws-missing-tools/tree/master/ec2-automate-backup https://simplyopensource.blogspot.tw/2014/04/script-to-create-daily-ami-of-aws.html https://simplyopensource.blogspot.tw/2016/02/script-to-delete-ami-with-attached.html https://www.flynsarmy.com/2015/06/how-to-schedule-daily-rolling-ebs-snapshots/

2017-05-09 · 1 min · 5 words · Me

T2 instance CPU Credit Usage & Balance

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html CPUCreditUsage (Only valid for T2 instances) The number of CPU credits consumed during the specified period. consumed 消耗 CPUCreditBalance (Only valid for T2 instances) The number of CPU credits that an instance has accumulated. accumulated 累積

2016-11-28 · 1 min · 37 words · Me

[轉]Leveraging AWS tools to speed up management of Galera Cluster on Amazon Cloud

http://severalnines.com/blog/leveraging-aws-tools-speed-management-galera-cluster-amazon-cloud

2016-11-17 · 1 min · word · Me