<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Lambda on lunaplus*</title><link>https://www.lunaplus.net/tags/lambda/</link><description>Recent content in Lambda on lunaplus*</description><generator>Hugo -- gohugo.io</generator><language>ja</language><lastBuildDate>Wed, 29 Sep 2021 00:00:00 +0000</lastBuildDate><atom:link href="https://www.lunaplus.net/tags/lambda/index.xml" rel="self" type="application/rss+xml"/><item><title>AWS Lambda関数をPowerShellで作成する</title><link>https://www.lunaplus.net/posts/2021/09/powershell-lambda/</link><pubDate>Wed, 29 Sep 2021 00:00:00 +0000</pubDate><guid>https://www.lunaplus.net/posts/2021/09/powershell-lambda/</guid><description>&lt;h2 id="powershell-on-mac"&gt;PowerShell on Mac&lt;/h2&gt;
&lt;p&gt;Mac上でPowerShellを動かしてみたくなり、それだけでは面白くないなぁと言うことで、勢いで&lt;a href="https://docs.aws.amazon.com/lambda/latest/dg/lambda-powershell.html"&gt;AWS Lambdaのモジュールを作成&lt;/a&gt;してみました。
色々と調べながら試行錯誤したので、記事にしてみました。&lt;/p&gt;
&lt;p&gt;まずは、Mac上でBrewを使って、PowerShellをインストールします。&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-shell"&gt;brew install —cask powershell
==&amp;gt; Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.1.
==&amp;gt; Downloading from https://github-releases.githubusercontent.com/49609581/89b7
######################################################################## 100.0%
==&amp;gt; Installing Cask powershell
==&amp;gt; Running installer for powershell; your password may be necessary.
Package installers may write to any location; options such as `--appdir` are ignored.
Password:
installer: Package name is PowerShell - 7.1.4
installer: Installing at base path /
installer: The install was successful.
🍺 powershell was successfully installed!
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;はい。順調です。&lt;br&gt;
すでにこの段階でPowerShellが動き出します。コマンド名は、&lt;code&gt;pwsh&lt;/code&gt; で起動します。&lt;/p&gt;</description></item><item><title>Lambda PythonからAthenaにクエリーを実行する</title><link>https://www.lunaplus.net/posts/2020/02/python-2-athena/</link><pubDate>Sat, 13 May 2017 00:00:00 +0000</pubDate><guid>https://www.lunaplus.net/posts/2020/02/python-2-athena/</guid><description>&lt;p&gt;オペレーション上の障害でログ調査が必要になり、Athenaを使い始めました。&lt;/p&gt;
&lt;p&gt;Athenaを使うとS3上のログファイルに対してブラウザ上でクエリをちょこちょこと書いて検索するだけなので非常に便利です。ただ、現実には毎日や毎時ごとのパーティションを事前に作成する必要があり、この作業が結構忘れがち、、なので「Lambdaからパーティション作成をやってしまおう」という算段です。&lt;/p&gt;</description></item></channel></rss>