- 安装 AWS CLI https://aws.amazon.com/cn/cli/
- 安装 AWS SAM https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html
- 设置 aws 账户信息
- 命令行运行
aws configure
- 命令行运行
- export SAM_CLI_TELEMETRY=0
npm run dev需要启动docker- aws/aws-sam-cli#2272
- 为了连接DocumentDB, 需要配置lambda的VPC
- 增加超时时间和内存
- [x](每次部署完需要手动将documentdb global-bundle.pem文件, 传到线上的lambda目录里)
- 已解决, 请配置afterBundling
- 如果s3 upload超时需要配置, vpc endpoint, 选择s3 Gateway
- dynamodb生产环境需要配置 vpc endpoint
This is a blank project for CDK development with TypeScript.
The cdk.json file tells the CDK Toolkit how to execute your app.
npm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testsnpx cdk deploydeploy this stack to your default AWS account/regionnpx cdk diffcompare deployed stack with current statenpx cdk synthemits the synthesized CloudFormation template