AWS Elemental MediaConvert 支援 MP3 輸出了

AWS Elemental MediaConvert 宣佈支援 MP3 輸出的格式了:「MP3 Audio Output Now Available with AWS Elemental MediaConvert」。

找了維基百科上的 MP3 資料來看,歐盟是 2012 年就全面過期,而美國是 2017 年:

The basic MP3 decoding and encoding technology is patent-free in the European Union, all patents having expired there by 2012 at the latest. In the United States, the technology became substantially patent-free on 16 April 2017 (see below). MP3 patents expired in the US between 2007 and 2017.

會拖到 2020 年的現在才支援 MP3 不知道是什麼原因。一種可能 AWS 家的法務發現是還有其他地區沒列出來?另外一種可能是,如果考慮到 MediaConvert 的產品特性是以影音為主,所以 AAC 用的比較多,而發展 MP3 相關功能的動力不夠...

AWS 的 CA 更新 (CA-2019),將會影響與資料庫相關的服務

AWS 要開始使用新的 CA 發各種資料庫相關服務的 SSL endpoint (包括 RDSAuroraDocumentDB),看一下差不多是十多天前的消息,不知道為什麼突然發個緊急通告:「Urgent & Important – Rotate Your Amazon RDS, Aurora, and Amazon DocumentDB (with MongoDB compatibility) Certificates」。

本來的 CA 是 CA-2015,將在 2020 年到期:

March 5, 2020 – The CA-2015 certificates will expire. Applications that use certificate validation but have not been updated will lose connectivity.

所以會有裡面提到的事項要處理,其中前幾天讓新的 CA-2019 變成新機器的預設值,但如果有需要,還是可以選舊的:

January 14, 2020 – Instances created on or after this date will have the new (CA-2019) certificates. You can temporarily revert to the old certificates if necessary.

可以把 https://s3.amazonaws.com/rds-downloads/rds-ca-2019-root.pem 拉下來用 openssl x509 -text -in rds-ca-2019-root.pem 看,另外把網址裡的 2019 改成 2015 也可以拉到舊版的。

不過看起來沒有用 X.509 Name Constraints 限制在只有自家 RDS 的網域...

CloudFront 的新拓點...

Amazon CloudFront 這次公告增加了新的節點,都是該地區的第一個點,可以大幅降低 latency:「Amazon CloudFront launches in five new countries - Bulgaria, Greece, Hungary, Kenya, and Romania」。

這種點就是拿來認地名的,這波算是比較熟悉的... 保加利亞、希臘、匈牙利、肯亞、羅馬尼亞,拉維基百科的資料:

保加利亞共和國(保加利亞語:Република България) 通稱保加利亞,是位於歐洲東南部巴爾幹半島上的一個國家。它與羅馬尼亞、塞爾維亞、北馬其頓、希臘和土耳其接壤,東部濱臨黑海。

希臘共和國(希臘語:Ελληνική Δημοκρατία,希臘語發音:[eliniˈci ðimokraˈti.a])[8][9],通稱希臘(希臘語:Ελλάδα,希臘語發音:[eˈlaða]),是位於歐洲東南部的跨大洲國家。2019年其人口為1,080萬。雅典為希臘首都及最大城市,塞薩洛尼基為第二大城市。

匈牙利(匈牙利語:Magyarország),是一個位於中歐的內陸國家[10],但是長期和東歐、南歐歷史有關聯。匈牙利與奧地利、斯洛伐克、烏克蘭、羅馬尼亞、塞爾維亞、克羅埃西亞和斯洛維尼亞接壤,人口976萬,首都為布達佩斯。官方語言為匈牙利語,這是歐洲最廣泛使用的非印歐語系語言[11]。

肯亞共和國(斯瓦希里語:Jamhuri ya Kenya,英語:Republic of Kenya,/ˈkɛnjə/,或/ˈkiːnjə/) 通稱肯亞,是位於東非,瀕臨印度洋,與索馬利亞、衣索比亞、南蘇丹、烏干達、坦尚尼亞接壤,面積約58萬平方公里[2]。肯亞人口約5051萬,一共有42個民族[8],分成班圖、尼羅和庫施特三大語系[9],官方語言是英語和斯瓦希里語。全國分為47個縣市[2],首都為奈洛比[10]。

羅馬尼亞(羅馬尼亞語:România),位於歐洲東南部。羅馬尼亞國境西方分別為匈牙利與塞爾維亞接壤,保加利亞在南方,北方與東北方則是烏克蘭與摩爾多瓦共和國。羅馬尼亞有一小段位於黑海邊的海岸線,多瑙河幾乎佔了南邊與保加利亞之間的國界大半,並且從該國東邊海岸流入黑海的西岸。羅馬尼亞的首都為布加勒斯特,位於該國南部多瑙河支流登博維察河所流經的平原地帶上,是羅馬尼亞第一大城與工商業城市。

所以是東歐、東南歐、中歐、東非、東南歐...

freeDB 將在明年三月底關閉

Hacker News 上看到的消息,提供 CD 資訊的 freeDB 將在明年三月底關閉:「FreeDB Is Shutting Down (freedb.org)」。

freeDB 的關閉算是一段歷史的終章,實際對使用者的影響應該不算大,一方面是 CD 的銷量逐漸下滑,另外一方面是因為現在的程式大多數會同時支援 freeDB 與 MusicBrainz (如果翻一下歷史的話,會注意到後者本來就是因為 freeDB 的授權結構而另外發展出來的服務)。

現在幾乎都是用串流服務與 YouTube 了...

雲端免費服務的整理

在「free-for.dev」這邊看到的資料,裡面提到了「Free for developers」這個網站。

很多雲端服務都有提供 free tier,有些是一段期間免費,但有些是終身免費。光是用這些終身免費的部份,就能夠弄出不少東西了,只是很多人不知道有這些服務... 這個網站提供的列表則是很清楚的整理出來重點。

然後剛剛才發現 Amazon SES 服務本身每個月有免費的額度的 (頻寬另計):

When you call Amazon SES from an application hosted in Amazon EC2, you can send 62,000 messages per month at no charge. This Free Usage Tier benefit does not expire.

而且列表裡列的豐富度,看起來可以取代掉之前我很喜歡翻的 ToolsOfTheTrade,至少可以當作互補...

省頻寬的方法:終極版本...

看到「Three ways to reduce the costs of your HTTP(S) API on AWS」這邊介紹在 AWS 上省頻寬費用的方法,看了只能一直笑 XD

第一個是降低 HTTP response 裡沒有用到的 header,因為每天有五十億個 HTTP request,所以只要省 1byte 就是省下 USD$0.25/day:

Since we would send this five billion times per day, every byte we could shave off would save five gigabytes of outgoing data, for a saving of 25 cents per day per byte removed.

然後調了一些參數後省下 USD$1,500/month:

Sending 109 bytes instead of 333 means saving $56 per day, or a bit over $1,500 per month.

第二個是想辦法在 TLS 這邊下手,一開始其中一個方向是利用 TLS session resumption 降低第二次連線的成本,但他們發現沒有什麼參數可以調整:

One thing that reduces handshake transfer size is TLS session resumption. Basically, when a client connects to the service for the second time, it can ask the server to resume the previous TLS session instead of starting a new one, meaning that it doesn’t have to send the certificate again. By looking at access logs, we found that 11% of requests were using a reused TLS session. However, we have a very diverse set of clients that we don’t have much control over, and we also couldn’t find any settings for the AWS Application Load Balancer for session cache size or similar, so there isn’t really anything we can do to affect this.

所以改成把 idle 時間拉長 (避免重新連線):

That leaves reducing the number of handshakes required by reducing the number of connections that the clients need to establish. The default setting for AWS load balancers is to close idle connections after 60 seconds, but it seems to be beneficial to raise this to 10 minutes. This reduced data transfer costs by an additional 8%.

再來是 AWS 本身發的 SSL certification 太肥,所以他們換成 DigiCert 發的,大幅降低憑證本身的大小,反而省下 USD$200/day:

So given that the clients establish approximately two billion connections per day, we’d expect to save four terabytes of outgoing data every day. The actual savings were closer to three terabytes, but this still reduced data transfer costs for a typical day by almost $200.

這些方法真的是頗有趣的 XDDD

不過這些方法也是在想辦法壓榨降低與 client 之間的傳輸量啦,比起成本來說反而是提昇網路反應速度...

Amazon EC2 可以掛多個 Elastic Inference 了

看到 Jeff Barr 的 tweet:

所以是一台 Amazon EC2 的主機可以掛多個 Elastic Inference (GPU) 了,這主要應該還是對現有的使用者有幫助。還沒有使用的應該會往新的 AWS Inferentia 測試?(參考「AWS 開始推自己的 Machine Learning Chip」)

CloudFront 的 access log 多了一些欄位

CloudFront 的 access log 多了一些欄位可以抓:「Amazon CloudFront now provides seven new data fields in access logs」。

官方這次加了七個欄位,看起來後面六個都還蠻有用的... (第一個 c-port 是 client 的 port,目前只想的到 debug 時可以拿出來看...)

而第二個的 time-to-first-byte 可以拿來分析效能,這是從 CloudFront 的角度來看的。

第三個的 x-edge-detailed-result-type 是錯誤時的處理,讓管理者可以從 access log 直接粗略分析。

剩下的四個都是跟 content type 與 length/range 有關,之前居然沒有嗎...

企業內的文件搜尋系統 Amazon Kendra

AWS 推出了具有語意分析的能力,可以直接丟自然語言進去搜尋的 Amazon Kendra:「Announcing Amazon Kendra: Reinventing Enterprise Search with Machine Learning」。

之前 Google 有推出過 Google Search Appliance 也是做企業內資料的整合 (2016 年收掉了),但應該沒有到可以用自然語言搜尋?

Amazon Kendra 的費用不算便宜,Enterprise Edition 提供 150GB 的容量與 50 萬筆文件,然後提供大約 40k query/day,這樣要 USD$7/hr,一個月大約是 USD$5,040,不過對於企業來說應該是很有用...

另外有提到這邊 query 收費的部份是估算,會依照 query 問題的難易度而不同:

Actual queries per day will vary based on query complexity, which greatly varies from customer to customer. Less complex queries (e.g. “leave policy”) consume less resources to run, and more complex queries (e.g. “What’s the daily parking allowance in Seattle?”) consume more resources to run. The total number of queries you can run with your allocated resources will depend on your mix of queries. The max queries per day provided above is an estimate, assuming 80% less complex queries and 20% more complex queries.

這樣頗有趣的,感覺可以處理簡單的分析了?

Amazon Detective:用 Machine Learning 分析可能的安全問題

也是這次 AWS re:Invent 發表的服務,透過 Machine Learning 分析可能的安全問題:「Introducing Amazon Detective」。

透過現有的各種 log 建立模型分析:

Amazon Detective can analyze trillions of events from multiple data sources such as Virtual Private Cloud (VPC) Flow Logs, AWS CloudTrail, and Amazon GuardDuty, and automatically creates a unified, interactive view of your resources, users, and the interactions between them over time.

依照 log 的量算錢的,然後 preview 階段不收費,所以有興趣的人可以開起來跑看看?