Yet another bootstrap theme.

2022-03-28
data-pipeline

Read More

2022-03-25
aws-redshift

一直以來,說到要做大量的資料分析 or 說到 Data Warehousing 都會提到 AWS redshift
找時間來看看何時使用 redshift & 適用的情形如何

Reference

Read More

2022-03-25
aws-resource-group

使用 serverless framework 搭配 AWS resource group,來方便的進行 cloud watch 的觀察

Reference

Read More

2022-03-17
aws-cognito-issue

使用這篇來記錄一下,自己有遇到過的 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
Read More

2022-03-14
hhkb

Read More

2022-03-10
aws-sns-dkim

Read More

2022-03-10
aws-cognito-custom-message

使用 cognito 時,通常會想要客制化寄信出來的 message

目前的作法

Reference

Read More

2022-03-03
cloud-watch-url

在 AWS 中,所產生的 log 都是會記錄到 cloud-watch 中,所以在產生 mail 通知時,如果能一並建立連結到 cloud-watch 的log,會是滿方便的
產生 url 的過程中,找到 AWS 是將 log_group, log_stream 進行了兩次 encodeURI,然後產生 url 的

可以參考的 python code

`
def get_cloud_watch_search_url(search, log_group, log_stream, region=None,):
“””Return a properly formatted url string for search cloud watch logs

search = "{$.message: "You are amazing"}
log_group = Is the group of message you want to search
log_stream = The stream of logs to search
"""

url = f'https://{region}.console.aws.amazon.com/cloudwatch/home?region={region}'

def aws_encode(value):
    """The heart of this is that AWS likes to quote things twice with some substitution"""
    value = urllib.parse.quote_plus(value)
    value = re.sub(r"\+", " ", value)
    return re.sub(r"%", "$", urllib.parse.quote_plus(value))

bookmark = '#logsV2:log-groups'
bookmark += '/log-group/' + aws_encode(log_group)
bookmark += "/log-events/" + log_stream
bookmark += re.sub(r"%", "$", urllib.parse.quote("?filterPattern="))
bookmark += aws_encode(search)

return url + bookmark

`

Reference

Read More

2022-02-23
about-buddhism

Read More

2022-02-22
jq-tips

在使用 json 的過程中,有一個方便的 cmd 工具是很需要的
jq 就是這麼一個好用的工具

Tips

Reference

Read More