<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Aws on despatches</title><link>https://icle.es/tags/aws/</link><description>Recent content in Aws on despatches</description><generator>Hugo</generator><language>en</language><lastBuildDate>Fri, 20 Jun 2025 09:25:00 +0100</lastBuildDate><atom:link href="https://icle.es/tags/aws/index.xml" rel="self" type="application/rss+xml"/><item><title>How to get current Function URL (aws-lambda + golang)</title><link>https://icle.es/2023/11/08/how-to-get-current-function-url-aws-lambda-golang/</link><pubDate>Wed, 08 Nov 2023 12:10:16 +0000</pubDate><guid>https://icle.es/2023/11/08/how-to-get-current-function-url-aws-lambda-golang/</guid><description>&lt;p>When deploying a function lambda that needs details of its own function URL.
It's an OAuth Callback, and needs to calculate the redirect. There are possible
security issues doing it this way, so will switch to http gateway on launch. In
the meantime, though, I ran into a bit of a chicken and egg problem.&lt;/p>
&lt;p>In Pulumi, the function URL is created after the function (and even otherwise),
I can't pass the output of the lambda (or lambdaFunctionUrl) back in as an
environment variable. Fortunately, there is an easy way to pick up the Function
URL (or the function name for that matter) - if you know how ;)&lt;/p></description><content:encoded><![CDATA[<p>When deploying a function lambda that needs details of its own function URL.
It's an OAuth Callback, and needs to calculate the redirect. There are possible
security issues doing it this way, so will switch to http gateway on launch. In
the meantime, though, I ran into a bit of a chicken and egg problem.</p>
<p>In Pulumi, the function URL is created after the function (and even otherwise),
I can't pass the output of the lambda (or lambdaFunctionUrl) back in as an
environment variable. Fortunately, there is an easy way to pick up the Function
URL (or the function name for that matter) - if you know how ;)</p>
```wp-block-syntaxhighlighter-code
   domainName := request.RequestContext.DomainName
    funcName := os.Getenv("AWS_LAMBDA_FUNCTION_NAME")
    return fmt.Sprintf("Domain: %s, funcName: %s", domainName, funcName), nil
```
<p>There are other
<a href="https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime">defined lambda function environment variables</a>
as well that you can use.</p>
]]></content:encoded></item><item><title>How do you access a specific version of a parameter from AWS Systems Manager Parameter Store</title><link>https://icle.es/2020/04/08/how-do-you-access-a-specific-version-of-a-parameter-from-aws-systems-manager-parameter-store/</link><pubDate>Wed, 08 Apr 2020 15:53:50 +0000</pubDate><guid>https://icle.es/2020/04/08/how-do-you-access-a-specific-version-of-a-parameter-from-aws-systems-manager-parameter-store/</guid><description>&lt;p>This was a bit tricky to find and doesn't seem to be well documented.&lt;/p>
```js
// version number below can be a number, i.e. 3 or a label
let params = {
 Name: "/path/to/parameter:&lt;version-number>",
 WithDecryption: false,
};

ssm.getParameter(params, function (err, data) {
 if (err) console.error(err, err.stack);
 else console.log(data);
});
```</description><content:encoded>&lt;p>This was a bit tricky to find and doesn't seem to be well documented.&lt;/p>
```js
// version number below can be a number, i.e. 3 or a label
let params = {
  Name: "/path/to/parameter:&lt;version-number>",
  WithDecryption: false,
};

ssm.getParameter(params, function (err, data) {
  if (err) console.error(err, err.stack);
  else console.log(data);
});
```
</content:encoded></item></channel></rss>