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
Copy file name to clipboardExpand all lines: docs/functions/customization.md
+16-14Lines changed: 16 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,30 +7,32 @@ The only two things _required_ for a Sidecar function are the [package and the h
7
7
8
8
Lambda supports multiple languages through the use of runtimes. You can choose any of the following runtimes by returning its corresponding identifier:
9
9
10
+
- Node.js 20: `nodejs20.x`
11
+
- Node.js 18: `nodejs18.x`
10
12
- Node.js 16: `nodejs16.x`
11
-
- Node.js 14: `nodejs14.x`
12
-
- Node.js 12: `nodejs12.x`
13
-
- Node.js 10: `nodejs10.x`
13
+
- Python 3.12: `python3.12`
14
+
- Python 3.11: `python3.11`
15
+
- Python 3.10: `python3.10`
16
+
- Python 3.9: `python3.9`
14
17
- Python 3.8: `python3.8`
15
-
- Python 3.7: `python3.7`
16
-
- Python 3.6: `python3.6`
17
-
- Python 2.7: `python2.7`
18
-
- Ruby 2.7: `ruby2.7`
19
-
- Ruby 2.5: `ruby2.5`
18
+
- Java 21: `java21`
19
+
- Java 17: `java17`
20
20
- Java 11: `java11`
21
-
- Java 8: `java8`
22
-
- Go 1.x: `go1.x`
23
-
- .NET Core 3.1: `dotnetcore3.1`
24
-
- .NET Core 2.1: `dotnetcore2.1`
21
+
- Java 8: `java8.al2`
22
+
- .NET 7: `dotnet7`
23
+
- .NET 6: `dotnet6`
24
+
- Ruby 3.2: `ruby3.2`
25
+
- OS-only runtime (Amazon Linux 2023): `provided.al2023`
26
+
- OS-only runtime (Amazon Linux 2): `provided.al2`
25
27
26
-
E.g. to use the Go runtime, you would return `go1.x`:
28
+
E.g. to use the Python 3.12 runtime, you would return `python3.12`:
Copy file name to clipboardExpand all lines: docs/functions/deploying.md
+9-13Lines changed: 9 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ When you run that, you'll see an output log similar to the one below:
22
22
↳ Activating Version 1 of SC-Laravel-local-Sidecar-OgImage.
23
23
```
24
24
25
-
The deployment process consists of
25
+
The deployment process consists of
26
26
- zipping the handler code
27
27
- uploading the zip file to S3
28
28
- creating the Lambda function if it doesn't exist
@@ -37,7 +37,7 @@ There are two required steps in order to make your functions live and usable.
37
37
38
38
Because your handler code may require you to `npm install`, `bundle install`, or something similar, you may be building and deploying your handler code in CI or from your local computer.
39
39
40
-
Once that handler code is all bundled and deployed to Lambda, there may be a secondary step required to deploy your main application.
40
+
Once that handler code is all bundled and deployed to Lambda, there may be a secondary step required to deploy your main application.
41
41
42
42
During this secondary step, your Lambda functions are going to be updated but your application code will not be, which could lead to errors for your users.
Your functions would be built and deployed on whatever machine is handling the Vapor deploy process, and then would be activated as Vapor activates your newest application code.
81
81
82
82
> Note that in this example we're setting the environment to "production" in the build, because it's likely that your "build" step is running in an environment that doesn't have it's ENV set to "production." See below for more details.
83
83
84
84
## Faking the Environment
85
-
86
-
Sidecar names your function based on environment, to prevent collisions between local, staging, production, etc. This could pose a problem if you are deploying your production functions from your build or CI server.
85
+
86
+
Sidecar names your function based on environment, to prevent collisions between local, staging, production, etc. This could pose a problem if you are deploying your production functions from your build or CI server.
87
87
88
88
If you need to deploy an environment other than the one you are in, you can override the environment from the config by passing an `--env` flag to the Deploy and Activate commands.
89
89
@@ -96,7 +96,7 @@ To read more about environments, head to the [Environments section](../environme
96
96
97
97
## Setting Environment Variables
98
98
99
-
This is covered in the [Environment Variables](customization#environment-variables) section of the Customization docs, but we'll cover strategies around env vars and deployment here.
99
+
This is covered in the [Environment Variables](customization#environment-variables) section of the Customization docs, but we'll cover strategies around env vars and deployment here.
100
100
101
101
Some of your functions will require environment variables, either from your Laravel application or something completely distinct. In some cases, you may need to set a static variable so that some library will work [(LibreOffice example)](https://github.com/hammerstonedev/sidecar/issues/24):
102
102
@@ -159,7 +159,7 @@ Sidecar sets the environment variables _upon activation_. If you are deploying f
159
159
160
160
Environment variables are set before activation, and before any pre-warming takes place.
161
161
162
-
And remember! If Sidecar manages the environment variables for a function, it will clobber any changes you make in the AWS UI, so you cannot use both methods simultaneously.
162
+
And remember! If Sidecar manages the environment variables for a function, it will clobber any changes you make in the AWS UI, so you cannot use both methods simultaneously.
163
163
164
164
## Reusing Package Files
165
165
@@ -172,15 +172,11 @@ In the event that neither the code nor function configuration have changed, Side
172
172
You will see output similar to the following:
173
173
174
174
```text
175
-
[Sidecar] Deploying App\Sidecar\OgImage to Lambda. (Runtime nodejs12.x.)
175
+
[Sidecar] Deploying App\Sidecar\OgImage to Lambda. (Runtime nodejs20.x.)
176
176
↳ Function already exists, potentially updating code and configuration.
177
177
↳ Packaging function code.
178
178
↳ Package unchanged, reusing previous code package at s3://sidecar-us-east-2-XXX/sidecar/001-79a5915eaec296be04a0f4fb7cc80e40.zip.
179
179
↳ Function code and configuration are unchanged! Not updating anything. [tl! focus]
180
180
[Sidecar] Activating function App\Sidecar\OgImage.
181
181
↳ Activating Version 1 of SC-Laravel-local-Sidecar-OgImage.
Copy file name to clipboardExpand all lines: docs/functions/hooks.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ The following four methods are available to you on every Sidecar function:
11
11
-`beforeActivation`
12
12
-`afterActivation`
13
13
14
-
## Example: Before Deployment
14
+
## Example: Before Deployment
15
15
16
16
The `beforeDeployment` hook is a great place to run a build step if your function requires it. We'll be using the `ncc build` command mentioned in the [Handlers & Packages](handlers-and-packages#compiling-your-handler-with-ncc) section for this example.
17
17
@@ -44,7 +44,7 @@ With this in place, you'll see something like this in your logs:
44
44
```text
45
45
[Sidecar] Deploying App\Sidecar\Example to Lambda as `SC-App-local-Sidecar-Example`.
0 commit comments