Skip to content

Commit 2518870

Browse files
update cdk deployment docs (#610)
1 parent 0db498b commit 2518870

File tree

3 files changed

+20
-13
lines changed

3 files changed

+20
-13
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ jobs:
231231
- name: Install dependencies
232232
run: |
233233
python -m pip install --upgrade pip
234-
python -m pip install -r requirements.txt
234+
python -m pip install -r requirements-cdk.txt
235235
236236
# Let's wait a bit to make sure package is available on pypi
237237
- name: Sleep for 120 seconds
@@ -240,7 +240,7 @@ jobs:
240240

241241
# Build and Deploy CDK application
242242
- name: Build & Deploy
243-
run: npm run cdk deploy ${{ secrets.STACK_NAME }}-lambda-${{ secrets.STACK_STAGE }} --require-approval never
243+
run: npm run cdk -- deploy ${{ secrets.STACK_NAME }}-lambda-${{ secrets.STACK_STAGE }} --require-approval never
244244
env:
245245
TITILER_STACK_NAME: ${{ secrets.STACK_NAME }}
246246
TITILER_STACK_STAGE: ${{ secrets.STACK_STAGE }}
File renamed without changes.

docs/src/deployment/aws/lambda.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,30 @@ The Lambda stack is also deployed by the [AWS CDK](https://aws.amazon.com/cdk/)
1717

1818
```bash
1919
# Download titiler repo
20-
$ git clone https://github.com/developmentseed/titiler.git
20+
git clone https://github.com/developmentseed/titiler.git
21+
cd titiler/deployment/aws
2122

22-
# install cdk dependencies
23-
$ cd titiler/deployment/aws
24-
$ pip install -r requirements.txt
25-
$ npm install
23+
# Create a virtual environment
24+
python -m pip install --upgrade virtualenv
25+
virtualenv .venv
26+
source .venv/bin/activate
2627

27-
$ npm run cdk bootstrap # Deploys the CDK toolkit stack into an AWS environment
28+
# Install CDK dependencies
29+
python -m install -r requirements-cdk.txt
2830

29-
# in specific region
30-
$ npm run cdk bootstrap aws://${AWS_ACCOUNT_ID}/eu-central-1
31+
# Install NodeJS dependencies
32+
npm install
33+
34+
$ npm run cdk -- bootstrap # Deploys the CDK toolkit stack into an AWS environment
35+
36+
# or in specific region
37+
$ npm run cdk -- bootstrap aws://${AWS_ACCOUNT_ID}/eu-central-1
3138
```
3239

3340
2. Pre-Generate CFN template
3441

3542
```bash
36-
$ npm run cdk synth # Synthesizes and prints the CloudFormation template for this stack
43+
$ npm run cdk -- synth # Synthesizes and prints the CloudFormation template for this stack
3744
```
3845

3946
3. Update settings (see [intro.md](intro.md))
@@ -58,8 +65,8 @@ The Lambda stack is also deployed by the [AWS CDK](https://aws.amazon.com/cdk/)
5865
4. Deploy
5966

6067
```bash
61-
$ npm run cdk deploy mytiler-lambda-dev # Deploys the stack(s) titiler-lambda-dev in cdk/app.py
68+
$ npm run cdk -- deploy mytiler-lambda-dev # Deploys the stack(s) titiler-lambda-dev in cdk/app.py
6269
6370
# Deploy in specific region
64-
$ AWS_DEFAULT_REGION=eu-central-1 AWS_REGION=eu-central-1 npm run cdk deploy mytiler-lambda-dev
71+
$ AWS_DEFAULT_REGION=eu-central-1 AWS_REGION=eu-central-1 npm run cdk -- deploy mytiler-lambda-dev
6572
```

0 commit comments

Comments
 (0)