aws
2022-06-29
2022-06-27
2022-06-27
使用 s3cmd 來操作 aws s3 動作
Tips
- How to find zero byte files in Amazon S3 – iTecNote
s3cmd ls -r s3://bucketname | awk '{if ($3 == 0) print}'
Reference
2022-06-27
2022-05-09
Read More
2022-03-28
使用 amazon management 的 WMAA 來跑 Apache Airflow 是個要開始使用 airflow 的好方式
how to access WMAA airflow
example
airflow token
Reference
- Using Terraform to build a serverless Airflow via Amazon Managed Workflows and automatic DAG sync using GitHub Actions · ds/dx - a data science & ml engineering blog
- claudiobizzotto/aws-mwaa-terraform: AWS MWAA Quick Start With Terraform. 有依照這個 github 來跑起一個 airflow。要設定 kms 為 custom key 時,還需要在試試看
使用 KMS key 可以參考的:
- Customer managed keys for Data Encryption - Amazon Managed Workflows for Apache Airflow
- Amazon MWAA execution role - Amazon Managed Workflows for Apache Airflow 依據這篇來修改 execution role 權限
- 另外是要自行 grand 權限
- aws_kms_grant doesn’t accept service principals in grantee_principal fiend · Issue #13994 · hashicorp/terraform-provider-aws
aws kms create-grant --region us-east-2 --key-id key-id-xxxxxxxxxx-33333 --grantee-principal "airflow.us-east-2.amazonaws.com" --retiring-principal "airflow.us-east-2.amazonaws.com" --operations Decrypt Encrypt GenerateDataKey ReEncryptFrom ReEncryptTo RetireGrant DescribeKey --name wmaa_s3_key_grant
- 另外是要自行 grand 權限
- idealo/terraform-aws-mwaa: Terraform module to setup Managed Workflows with Apache Airflow. (Airflow as managed service by AWS) 可以改用這個 module 來建立 wmaa 試試
- Setting up MWAA to use a KMS key - DEV Community
有時間要來試試看
- Tutorial: Configuring the aws-mwaa-local-runner in a Continuous Delivery (CD) pipeline - Amazon Managed Workflows for Apache Airflow 可以整合 CI/CD 的方式
Compare
2022-03-25
Read More
2022-03-25
Read More
2022-03-17
使用這篇來記錄一下,自己有遇到過的 cognito issue
Issue List
How do I reset a Cognito user’s password that has expired?
- 問題:新建的 user 超過 7 天沒有 login 進去改 password
- error message : Temporary password has expired and must be reset by an administrator.
- 執行的 cmd 範例
aws cognito-idp admin-create-user --region us-east-1 --user-pool-id us-east-1_youruserpoolid --username theusername --message-action RESEND
- resend 後,預設的密碼會改變,要看信件中的 temporary password
- How do I reset a Cognito user’s password that has expired? - Stack Overflow
2022-03-10
使用 AWS SES 寄出通知信時,尤其是 gmail 時,會顯示為 via amazonses.com,然後此封 email 會被歸類為 spam
需要設定 DKIM 驗證,來避免此狀況
Reference
- How to prevent from gmail showing via amazonses.com? - MailBluster
- How to Set Up AWS SES and Avoid Spam Folders | by Rob Wilson | AWS in Plain English
- What is a DNS DKIM record? | Cloudflare
- 設定 SPF, DKIM, DMARC Email 驗證解決「Gmail 未經驗證網域」警告 - Soul & Shell Blog
- What is a DNS SPF record? | Cloudflare