You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
以前のエントリーで、AWS LambdaでJavaを使ってDynamoDBを呼び出した際に、初回起動にとても時間が掛かったという話を書きました。 http://d.hatena.ne.jp/cero-t/20160101/1451665326 今回は、この辺りの原因をもう少し追求してみます。 なぜ1回目と3回目のアクセスが遅いのか? AWS Lambdaの中身はよく知りませんが、おそらく、アップロードしたモジュールをTomcatみたいなコンテナとして起動させて、外部からコールしているんだろうと予想しました。それであれば、2回目以降のアクセスが早くなることは理解ができます。 ただ、1回目と3回目だけが極端に遅くて、2回目、4回目以降は早くなるというところは腑に落ちません。 その辺りを調べるべく、staticなカウンタを使って、値がどんな風に変化するかを調べてみました。 こんなソースコードです
丹内です。 掲題の通り、モバイルのバックエンドとしても期待されているAWS Lambdaを継続的に使う際に欠かせない、リリース周りについて考えてみます。 概要の説明 先日の勉強会での発表でLambdaをProduction環境にデプロイした例をお話しました。 しかしながら実務では「デプロイしたらそれっきり」というものは少なく、ビジネスやスケールの変化に伴いコードにも変更が発生します。 日々発生する変更を安全にデプロイし、問題があったらすぐロールバックできるということが、継続的なソフトウェア開発には必要です。 Lambda Functionにはバージョニングとエイリアスという機能が、これを使うことで、Blue-Green Deploymentのようにデプロイやロールバックが可能になります。 以下の図をご覧ください。 この図は、バージョニングとエイリアスを使った場合のデプロイ例を示しています。
はじめに Slack用ボットの定番は Heroku+Hubot だと思いますが、 もっと簡単、シンプルに よりElastic (負荷の増減に柔軟)に かつ、低予算 (サーバーレス) で 運用したいので、AWS Lambda 上に、ライブラリ(Hubot)を使わないで構築します。 システム構成は以下のようになります。 Slack→Lambda連携では、Content-Type について Slack「Outgoing WebHooks」出力は、 application/x-www-form-urlencoded AWS「Lambda」入力は、application/json なので、API Gateway での Content-Typeの変換処理がポイントになります。 以下、順番に作成していきます。 AWS側の設定 最初はLambda関数から。 Step 1: Select blueprint
Stop the CNAME chain struggle: Simplified management with Route 53 Resolver DNS Firewall Updated 2 May 2024: I removed the reference to Route53 Alias that was incorrectly referred as a chain Starting today, you can configure your DNS Firewall to automatically trust all domains in a resolution chain (such as aCNAMEor DNAMEchain). Let’s walk through this in nontechnical terms for those unfamiliar wi
AWS Compute Blog Understanding Container Reuse in AWS Lambda Tim Wagner, AWS Lambda AWS Lambda functions execute in a container (sandbox) that isolates them from other functions and provides the resources, such as memory, specified in the function’s configuration. In this article we discuss how Lambda creates and reuses these sandboxes, and the impact of those policies on the programming model. St
Here's a list of everything that's new in V.4, so far: Native Typescript Support: You can now use .ts handlers in your AWS Lambda functions in serverless.yml and have them build automatically upon deploy. ESBuild is now included in the Framework which makes this possible. More info here. New Dev Mode: Run serverless dev to have events from your live architecture routed to your local code, enabling
AWS Compute Blog Microservices without the Servers Tim Wagner, AWS Lambda General Manager At LinuxCon/ContainerCon 2015 I presented a demo-driven talk titled, “Microservices without the Servers”. In it, I created an image processing microservice, deployed it to multiple regions, built a mobile app that used it as a backend, added an HTTPS-based API using Amazon API Gateway and a website, and then
大量のファイルをgzipしたものをS3に配置したいニーズがあって、非力な手元のマシンで一旦gzipしてから転送するよりはLambdaにやらせたらいいのではないか?ということでやってみました。 以下のようなLambda functionを設置 大きなファイル(数十MB以上)を扱う場合はtimeoutをデフォルトの3秒から伸ばす。メモリも128MBでは足りないことがあるので512MBなど S3の読み書き権限があるIAM Roleを設定 S3のイベント通知でLambda functionをkick aws s3 sync で大量のファイルを同期してもアップロードが終わったファイルから順番に処理が走るので、同期が終わった数秒後にはgzipされたファイルが生成されている状態になります。 var aws = require('aws-sdk'); var zlib = require('zlib');
これはなにか AWSのLambdaを使って分散処理をします。 今回はAWS SNSのsubscribe追加をS3へのアップロードをトリガーにしたいと思います。 仕組み s3に登録したいsubscribeの情報を上げる Lambdaでその情報を解析する 解析した情報を元にSNSに登録していく この構成のメリット よくあるパターンとしてAWS SNSの登録に時間がかかってしまいメルマガやPush通知を打つのに時間がかかるというケースがあります。 この構成の場合、複数のサーバからSNSの登録が行われるため高速になります。 登録したい内容 protocol: http endpoint: http://example.com/[任意の文字] s3にアップロードする内容 1 b1 bb1 bbb1 bbbb1 bbbbb1 bbbbbb1 bbbbbbb1 bbbbbbbb1 bbbbbbbbb1
こんにちは、せーのです。今日はS3の画像をCloudfrontで配信する際のコツを自動化してしまおう、という試みです。 Cloudfrontキャッシュコントロールおさらい Cloudfrontは静的、動的関わらずキャッシュしてくれるとても便利なCDNサービスですが、Cloudfrontにてキャッシュしてくれる時間(TTL)は基本Cache-Control max-ageヘッダやExpiresにて制御します。更にCloudfront自体の設定にも[minimum TTL]というものがあり、これはヘッダで設定されたキャッシュ時間を強制的に上書きするためのものです。 ここで理解しておきたいのが「ヘッダとminimum TTLのキャッシュ時間の関係」です。詳しくはこちらの記事に書いてありますが、基本的には「キャッシュコントロールはヘッダありき。ヘッダの設定より長く強制的に上書きしたい時にminim
LambdaDriver by yuroyoro Rubyで、Procやlambdaで関数合成できるようにしたかったので、lambda_driver.gemというのを作った。 内容的にはこの辺で書いたヤツをgemにした感じ。 「関数型Ruby」という病(2) - 関数合成 Proc#compose - ( ꒪⌓꒪) ゆるよろ日記 「関数型Ruby」という病(3) - カリー化(Proc#curry, Proc#flip) - ( ꒪⌓꒪) ゆるよろ日記 こんな風に、カッコよくコードが書ける。 require 'lambda_driver' # [:foo, :bar, :baz].map{|s| s.to_s }.map{|s| s.upcase } # [:foo, :bar, :baz].map(&:to_s).map(&:upcase) [:foo, :bar, :baz].map(
# [:foo, :bar, :baz].map{|s| s.to_s }.map{|s| s.upcase } # [:foo, :bar, :baz].map(&:to_s).map(&:upcase) [:foo, :bar, :baz].map(&:to_s >> :upcase ) # => ["FOO", "BAR", "BAZ"] # [:foo, :hoge, :bar, :fuga].select{|s| s.to_s.length > 3} # => [:hoge, :fuga] [:foo, :hoge, :bar, :fuga].select(&:to_s >> :length >> 3._(:<)) # => [:hoge, :fuga] project page rubygems.org Build status Installation Add this li
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く