Skip to content

Commit

Permalink
Merge aws#5902 feat(lambda): Lambda Getting Started
Browse files Browse the repository at this point in the history
  • Loading branch information
justinmk3 authored Oct 30, 2024
2 parents f58de3a + fe602c6 commit 98cd776
Show file tree
Hide file tree
Showing 134 changed files with 15,041 additions and 2,095 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,11 +188,11 @@ To run a single test in VSCode, do any one of:
- Unix/macOS/POSIX shell:
```
TEST_FILE=src/test/foo.test.ts npm run test
TEST_FILE=../core/src/test/foo.test.ts npm run test
```
- Powershell:
```
$Env:TEST_FILE = "src/test/foo.test.ts"; npm run test
$Env:TEST_FILE = "../core/src/test/foo.test.ts"; npm run test
```
- To run all tests in a particular subdirectory, you can edit
Expand All @@ -209,11 +209,11 @@ To run tests against a specific folder in VSCode, do any one of:
- Run in your terminal
- Unix/macOS/POSIX shell:
```
TEST_DIR=src/test/foo npm run test
TEST_DIR=../core/src/test/foo npm run test
```
- Powershell:
```
$Env:TEST_DIR = "src/test/foo"; npm run test
$Env:TEST_DIR = "../core/src/test/foo"; npm run test
```
### Coverage report
Expand Down
902 changes: 882 additions & 20 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"webpack-merge": "^5.10.0"
},
"dependencies": {
"@types/node": "^18.19.55",
"@types/node": "^22.7.5",
"@aws-toolkits/telemetry": "^1.0.242",
"vscode-nls": "^5.2.0",
"vscode-nls-dev": "^4.0.4"
}
Expand Down
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,7 @@
"@amzn/codewhisperer-streaming": "file:../../src.gen/@amzn/codewhisperer-streaming",
"@aws-sdk/client-cognito-identity": "^3.637.0",
"@aws-sdk/client-lambda": "^3.637.0",
"@aws-sdk/client-cloudformation": "^3.667.0",
"@aws-sdk/client-sso": "^3.342.0",
"@aws-sdk/client-sso-oidc": "^3.574.0",
"@aws-sdk/credential-provider-ini": "3.46.0",
Expand Down
19 changes: 15 additions & 4 deletions packages/core/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,18 @@
"AWS.configuration.description.amazonq.workspaceIndexUseGPU": "Enable GPU to help index your local workspace files. Only applies to Linux and Windows.",
"AWS.configuration.description.amazonq.workspaceIndexMaxSize": "The maximum size of local workspace files to be indexed in MB",
"AWS.command.apig.copyUrl": "Copy URL",
"AWS.command.apig.invokeRemoteRestApi": "Invoke on AWS",
"AWS.command.apig.invokeRemoteRestApi": "Invoke in the cloud",
"AWS.command.apig.invokeRemoteRestApi.cn": "Invoke on Amazon",
"AWS.appBuilder.explorerTitle": "Application Builder",
"AWS.appBuilder.explorerNode.noApps": "[This resource is not yet supported.]",
"AWS.appBuilder.explorerNode.unavailableDeployedResource": "[Failed to retrive deployed resource.]",
"AWS.command.appBuilder.openHandler": "Open Function Handler",
"AWS.command.applicationComposer.open": "Open with Infrastructure Composer",
"AWS.command.appBuilder.openTemplate": "Open Template File",
"AWS.command.appBuilder.deploy": "Deploy SAM Application",
"AWS.command.appBuilder.build": "Build SAM Template",
"AWS.command.appBuilder.searchLogs": "Search Logs",
"AWS.command.refreshappBuilderExplorer": "Refresh Application Builder Explorer",
"AWS.command.applicationComposer.openDialog": "Open Template with Infrastructure Composer...",
"AWS.command.auth.addConnection": "Add New Connection",
"AWS.command.auth.showConnectionsPage": "Add New Connection",
Expand Down Expand Up @@ -118,7 +127,7 @@
"AWS.command.aboutToolkit": "About",
"AWS.command.downloadLambda": "Download...",
"AWS.command.uploadLambda": "Upload Lambda...",
"AWS.command.invokeLambda": "Invoke on AWS",
"AWS.command.invokeLambda": "Invoke in the cloud",
"AWS.command.invokeLambda.cn": "Invoke on Amazon",
"AWS.command.refreshAwsExplorer": "Refresh Explorer",
"AWS.command.refreshCdkExplorer": "Refresh CDK Explorer",
Expand Down Expand Up @@ -148,6 +157,8 @@
"AWS.command.renderStateMachineGraph": "Render graph",
"AWS.command.copyArn": "Copy ARN",
"AWS.command.copyName": "Copy Name",
"AWS.command.openAwsConsole": "Go to AWS management console",
"AWS.command.openAwsConsole.cn": "Go to Amazon management console",
"AWS.command.listCommands": "Show AWS Commands...",
"AWS.command.listCommands.cn": "Show Amazon Commands...",
"AWS.command.downloadStateMachineDefinition": "Download Definition...",
Expand Down Expand Up @@ -198,8 +209,8 @@
"AWS.command.ssmDocument.openLocalDocumentJson": "Download as JSON",
"AWS.command.ssmDocument.openLocalDocumentYaml": "Download as YAML",
"AWS.command.ssmDocument.publishDocument": "Publish a Systems Manager Document",
"AWS.command.launchConfigForm.title": "Edit SAM Debug Configuration",
"AWS.command.addSamDebugConfig": "Add SAM Debug Configuration",
"AWS.command.launchConfigForm.title": "Local Invoke and Debug Configuration",
"AWS.command.addSamDebugConfig": "Add Local Invoke and Debug Configuration",
"AWS.command.toggleSamCodeLenses": "Toggle SAM hints in source files",
"AWS.command.apprunner.createService": "Create Service",
"AWS.command.apprunner.createServiceFromEcr": "Create App Runner Service",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions packages/core/resources/markdown/samReadme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ ${LISTOFCONFIGURATIONS}

You can debug the Lambda handlers locally by adding a breakpoint to the source file, then running the launch configuration. This works by using Docker on your local machine.

Invocation parameters, including payloads and request parameters, can be edited either by the `Edit SAM Debug Configuration` command (through the ${COMMANDPALETTE} or ${CODELENS}) or by editing the `launch.json` file.
Invocation parameters, including payloads and request parameters, can be edited either by the `Local Invoke and Debug Configuration` command (through the ${COMMANDPALETTE} or ${CODELENS}) or by editing the `launch.json` file.

${COMPANYNAME} Lambda functions not defined in the [`template.yaml`](./template.yaml) file can be invoked and debugged by creating a launch configuration through the ${CODELENS} over the function declaration, or with the `Add SAM Debug Configuration` command.
${COMPANYNAME} Lambda functions not defined in the [`template.yaml`](./template.yaml) file can be invoked and debugged by creating a launch configuration through the ${CODELENS} over the function declaration, or with the `Add Local Invoke and Debug Configuration` command.

## Deploying Serverless Applications

Expand Down
25 changes: 25 additions & 0 deletions packages/core/resources/walkthrough/appBuilder/AppPicker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<checklist>
<div class="theme-picker-row">
<checkbox when-checked="command:aws.toolkit.lambda.setWalkthroughToAPI" checked-on="aws.toolkit.lambda.walkthroughSelected == 'API'">
<img width="200" src="./AppPickerResource/API.png"/>
Rest API
</checkbox>
<checkbox when-checked="command:aws.toolkit.lambda.setWalkthroughToS3" checked-on="aws.toolkit.lambda.walkthroughSelected == 'S3'">
<img width="200" src="./AppPickerResource/S3.png"/>
File processing
</checkbox>
</div>
<div class="theme-picker-row">
<checkbox when-checked="command:aws.toolkit.lambda.setWalkthroughToVisual" checked-on="aws.toolkit.lambda.walkthroughSelected == 'Visual'">
<img width="200" src="./AppPickerResource/AppComposer.png"/>
New template with visual builder
</checkbox>
<checkbox when-checked="command:aws.toolkit.lambda.setWalkthroughToCustomTemplate" checked-on="aws.toolkit.lambda.walkthroughSelected == 'CustomTemplate'">
<img width="200" src="./AppPickerResource/CustomTemplate.png"/>
Current workspace template
</checkbox>
</div>
</checklist>
<checkbox class="theme-picker-link" when-checked="command:aws.lambda.createNewSamApp" checked-on="false">
See more application example...
</checkbox>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 98cd776

Please sign in to comment.