Skip to content

Commit ddf2bc4

Browse files
aws-sam-tooling-bot[bot]lambda-tooling+rie
andauthored
Update from upstream - 2026-07-31 (aws#182)
Co-authored-by: lambda-tooling+rie <lambda-tooling+rie@amazon.com>
1 parent a0f264a commit ddf2bc4

21 files changed

Lines changed: 196 additions & 62 deletions

‎.github/workflows/check-binaries.yml‎

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ jobs:
1515
report_contents: ${{ steps.save-output.outputs.report_contents }}
1616
steps:
1717
- name: Setup python
18-
uses: actions/setup-python@v5
18+
uses: actions/setup-python@v6
1919
with:
2020
python-version: '3.11'
2121
- name: Checkout code
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
2323
with:
2424
ref: main
2525
- name: Download latest release
26-
uses: robinraju/release-downloader@v1.10
27-
with:
28-
latest: true
29-
fileName: 'aws-lambda-rie*'
30-
out-file-path: "bin"
26+
run: |
27+
mkdir -p bin
28+
gh release download --pattern 'aws-lambda-rie*' --dir bin
29+
env:
30+
GH_TOKEN: ${{ github.token }}
3131
- name: Run check for vulnerabilities
3232
id: check-binaries
3333
run: |
@@ -61,25 +61,29 @@ jobs:
6161
name: Save outputs for the check with the latest build
6262
id: save-new-version
6363
run: |
64-
if [ "${{ steps.check-new-version.outcome }}" == "failure" ]; then
64+
if [ "${CHECK_OUTCOME}" == "failure" ]; then
6565
fixed="No"
6666
else
6767
fixed="Yes"
6868
fi
6969
echo "fixed=$fixed" >> "$GITHUB_OUTPUT"
70+
env:
71+
CHECK_OUTCOME: ${{ steps.check-new-version.outcome }}
7072
- if: always() && steps.save-output.outputs.report_contents
7173
name: Create GitHub Issue indicating vulnerabilities
7274
id: create-issue
73-
uses: dacbd/create-issue-action@main
74-
with:
75-
token: ${{ github.token }}
76-
title: |
77-
CVEs found in latest RIE release
78-
body: |
79-
### CVEs found in latest RIE release
80-
```
81-
${{ steps.save-output.outputs.report_contents }}
82-
```
83-
84-
#### Are these resolved by building with the latest patch version of Go (${{ steps.check-new-version.outputs.latest_version }})?:
85-
> **${{ steps.save-new-version.outputs.fixed }}**
75+
run: |
76+
gh issue create \
77+
--title "CVEs found in latest RIE release" \
78+
--body "### CVEs found in latest RIE release
79+
\`\`\`
80+
${REPORT_CONTENTS}
81+
\`\`\`
82+
83+
#### Are these resolved by building with the latest patch version of Go (${LATEST_VERSION})?:
84+
> **${FIXED}**"
85+
env:
86+
GH_TOKEN: ${{ github.token }}
87+
REPORT_CONTENTS: ${{ steps.save-output.outputs.report_contents }}
88+
LATEST_VERSION: ${{ steps.check-new-version.outputs.latest_version }}
89+
FIXED: ${{ steps.save-new-version.outputs.fixed }}

‎.github/workflows/integ-tests.yml‎

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,33 @@ permissions:
1313
jobs:
1414
go-tests:
1515
runs-on: ubuntu-latest
16-
environment:
17-
name: integ-tests
1816
steps:
19-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v6
2018
- name: run go tests
2119
run: make tests-with-docker
2220
integ-tests-x86:
2321
runs-on: ubuntu-latest
24-
environment:
25-
name: integ-tests
2622
steps:
27-
- uses: actions/checkout@v4
28-
- uses: actions/setup-python@v5
23+
- uses: actions/checkout@v6
24+
- uses: actions/setup-python@v6
2925
with:
3026
python-version: '3.11'
3127
- name: run integration tests
3228
run: make integ-tests-with-docker-x86-64
3329
integ-tests-arm64:
3430
runs-on: ubuntu-latest
35-
environment:
36-
name: integ-tests
3731
steps:
38-
- uses: actions/checkout@v4
39-
- uses: actions/setup-python@v5
32+
- uses: actions/checkout@v6
33+
- uses: actions/setup-python@v6
4034
with:
4135
python-version: '3.11'
4236
- name: run integration tests
4337
run: make integ-tests-with-docker-arm64
4438
integ-tests-old:
4539
runs-on: ubuntu-latest
46-
environment:
47-
name: integ-tests
4840
steps:
49-
- uses: actions/checkout@v4
50-
- uses: actions/setup-python@v5
41+
- uses: actions/checkout@v6
42+
- uses: actions/setup-python@v6
5143
with:
5244
python-version: '3.11'
5345
- name: run integration tests

‎.github/workflows/release.yml‎

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
environment: Release
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v6
2323
with:
2424
ref: main
2525
- name: Set up python
26-
uses: actions/setup-python@v5
26+
uses: actions/setup-python@v6
2727
with:
2828
python-version: '3.11'
2929
- name: Build
@@ -33,12 +33,14 @@ jobs:
3333
make tests-with-docker
3434
make integ-tests
3535
- name: Release
36-
uses: softprops/action-gh-release@v2
37-
with:
38-
name: Release ${{ github.event.inputs.releaseVersion }}
39-
tag_name: v${{ github.event.inputs.releaseVersion }}
40-
body: ${{ github.event.inputs.releaseBody }}
41-
files: |
42-
bin/aws-lambda-rie
43-
bin/aws-lambda-rie-arm64
36+
run: |
37+
gh release create "v${RELEASE_VERSION}" \
38+
--title "Release ${RELEASE_VERSION}" \
39+
--notes "${RELEASE_BODY}" \
40+
bin/aws-lambda-rie \
41+
bin/aws-lambda-rie-arm64 \
4442
bin/aws-lambda-rie-x86_64
43+
env:
44+
GH_TOKEN: ${{ github.token }}
45+
RELEASE_VERSION: ${{ github.event.inputs.releaseVersion }}
46+
RELEASE_BODY: ${{ github.event.inputs.releaseBody }}

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ tags
77
.idea
88
.DS_Store
99
.venv
10+
build.log

‎internal/lambda-managed-instances/aws-lambda-rie/internal/invoke/rie_invoke_request.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ type rieInvokeRequest struct {
4040
cognitoIdentityPoolId string
4141
clientContext string
4242
responseMode string
43+
internalInvocationID string
4344

4445
functionVersionID string
4546
}
@@ -98,6 +99,7 @@ func NewRieInvokeRequest(request *http.Request, writer http.ResponseWriter) (*ri
9899
cognitoIdentityPoolId: cognitoIdentityPoolId,
99100
clientContext: clientContext,
100101
responseMode: request.Header.Get(invoke.ResponseModeHeader),
102+
internalInvocationID: uuid.New().String(),
101103
}
102104

103105
return req, nil
@@ -184,3 +186,7 @@ func (r *rieInvokeRequest) UpdateFromInitData(initData interop.InitStaticDataPro
184186
func (r *rieInvokeRequest) FunctionVersionID() string {
185187
return r.functionVersionID
186188
}
189+
190+
func (r *rieInvokeRequest) InternalInvocationID() string {
191+
return r.internalInvocationID
192+
}

‎internal/lambda-managed-instances/aws-lambda-rie/internal/invoke/rie_invoke_request_test.go‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ func TestNewRieInvokeRequest(t *testing.T) {
143143
if tt.want.invokeID == "" {
144144
tt.want.invokeID = got.invokeID
145145
}
146+
tt.want.internalInvocationID = got.internalInvocationID
146147

147148
assert.Equal(t, tt.want, got)
148149
})

‎internal/lambda-managed-instances/interop/mock_invoke_request.go‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,23 @@ func (_m *MockInvokeRequest) FunctionVersionID() string {
143143
return r0
144144
}
145145

146+
func (_m *MockInvokeRequest) InternalInvocationID() string {
147+
ret := _m.Called()
148+
149+
if len(ret) == 0 {
150+
panic("no return value specified for InternalInvocationID")
151+
}
152+
153+
var r0 string
154+
if rf, ok := ret.Get(0).(func() string); ok {
155+
r0 = rf()
156+
} else {
157+
r0 = ret.Get(0).(string)
158+
}
159+
160+
return r0
161+
}
162+
146163
func (_m *MockInvokeRequest) InvokeID() string {
147164
ret := _m.Called()
148165

‎internal/lambda-managed-instances/interop/sandbox_model.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ type InvokeRequest interface {
302302

303303
UpdateFromInitData(InitStaticDataProvider) model.AppError
304304
FunctionVersionID() string
305+
306+
InternalInvocationID() string
305307
}
306308

307309
type InitStaticDataProvider interface {

‎internal/lambda-managed-instances/invoke/consts.go‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ const (
99
FunctionErrorBodyTrailer = "lambda-runtime-function-error-body"
1010
ResponseModeHeader = "invoke-response-mode"
1111
TraceIdHeader = "x-amzn-trace-id"
12+
13+
RuntimeInvocationIdHeader = "lambda-runtime-invocation-id"
1214
)
1315

1416
type InvokeBodyResponseStatus string

‎internal/lambda-managed-instances/invoke/invoke_router.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ type RuntimeResponseRequest interface {
3535
BodyReader() io.Reader
3636

3737
TrailerError() ErrorForInvoker
38+
39+
InvocationID() string
3840
}
3941

4042
type RuntimeErrorRequest interface {
@@ -47,6 +49,8 @@ type RuntimeErrorRequest interface {
4749
ReturnCode() int
4850
ErrorDetails() string
4951
GetXrayErrorCause() json.RawMessage
52+
53+
InvocationID() string
5054
}
5155

5256
type runningInvoke interface {

0 commit comments

Comments
 (0)