Skip to content

Commit 9e4488d

Browse files
committed
missing region
1 parent ccd8bb1 commit 9e4488d

File tree

4 files changed

+25
-8
lines changed

4 files changed

+25
-8
lines changed

.github/workflow/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
on: [push]
2+
3+
jobs:
4+
invoke:
5+
runs-on: ubuntu-latest
6+
name: Testing
7+
steps:
8+
- name: Testing getApps
9+
id: getApps
10+
uses: actions/hello-world-javascript-action@v1
11+
with:
12+
who-to-greet: "Mona the Octocat"
13+
# Use the output from the `hello` step
14+
- name: Get the output time
15+
run: echo "The time was ${{ steps.hello.outputs.time }}"

action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,21 @@ inputs:
1010
AWS_SESSION_TOKEN:
1111
description: "AWS_SESSION_TOKEN"
1212
required: false
13+
REGION:
14+
description: "region where the lambda has been created (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html)"
15+
required: false
16+
default: us-east-1
1317
FunctionName:
1418
description: "The name of the Lambda function, version, or alias"
1519
required: true
1620
InvocationType:
1721
description: "Choose from the following options: RequestResponse, Event, DryRun"
1822
required: false
19-
default: "RequestResponse"
23+
default: RequestResponse
2024
LogType:
2125
description: "Choose from the following options: None, Tail"
2226
required: false
23-
default: "RequestResponse"
27+
default: RequestResponse
2428
ClientContext:
2529
description: "Up to 3583 bytes of base64-encoded data about the invoking client to pass to the function in the context object."
2630
required: false

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const main = async () => {
4141

4242
const params = getParams();
4343

44-
const lambda = new Lambda({ apiVersion });
44+
const lambda = new Lambda({ apiVersion, region: getInput('REGION') });
4545

4646
const response = await lambda.invoke(params).promise();
4747

readme.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ uses: gagoar/invoke-aws-lambda@v1
2121
with:
2222
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
2323
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
24-
FunctionName: "SomeFunction"
25-
Payload: ${{ toJson({"key": value})}}
26-
description: "The JSON that you want to provide to your Lambda function as input. (Buffer, Typed Array, Blob, String)"
27-
required: false
28-
Qualifier: 'someAlias'
24+
FunctionName: SomeFunction
25+
Payload: '{"someInput": "value"}'
26+
Qualifier: someAlias
2927
```

0 commit comments

Comments
 (0)