Skip to content

Commit

Permalink
Merge pull request #51 from winglang/eladb/fix-awscdk-samples
Browse files Browse the repository at this point in the history
  • Loading branch information
eladb authored May 18, 2024
2 parents aa8955b + d2f218a commit 2816da5
Show file tree
Hide file tree
Showing 12 changed files with 1,343 additions and 159 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/wing-provider-specific.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Node.js v18
- name: Setup Node.js v20
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- name: Install winglang globally
run: |
npm install -g winglang@latest
Expand Down
31 changes: 19 additions & 12 deletions examples/provider-specific/awscdk-docker-python-lambda/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,39 @@ This isn't leveraging the Wing SDK, but using Constructs from the AWS CDK direct

This is largely based on an example by [Marcio Cruz](https://github.com/marciocadev) who contributed the AWS CDK provider for wing.

This project is using the [AWS CDK target platform](https://www.winglang.io/docs/platforms/awscdk).

![diagram](./diagram.png)

## Prerequisite

Please make sure to use a current and working setup of the [wing cli](https://docs.winglang.io/getting-started/installation).
Please make sure to use a current and working setup of the [Wing
CLI](https://docs.winglang.io/getting-started/installation)

## Usage

### Setup

Nb: In case of a globally installed Wing CLI, the `aws-cdk-lib` package needs to be installed globally as well. See this [issue](https://github.com/winglang/wing/issues/2478) for more details.

```
```sh
npm install
```

### Wing Console
### Wing Simulator

As of May 2023 the Wing Console is not yet supported.
```sh
wing it
```

### Bootstrap

### Wing Tests
Before the first deployment to an AWS environment (account/region), you'll need to bootstrap some CDK resources:

As of May 2023 tests are not yet supported out of the box
```sh
npx cdk bootstrap
```

### Deploy

```sh
npx cdk deploy
```
export CDK_STACK_NAME="wing-docker-python-lambda"
wing compile -t awscdk main.w
npx cdk deploy --app "./target/main.awscdk"
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"app": "CDK_STACK_NAME=awscdk-docker-python-lambda-test wing compile --no-analytics --no-update-check --platform @winglang/platform-awscdk main.w",
"output": "target/main.awscdk"
}
Loading

0 comments on commit 2816da5

Please sign in to comment.