Skip to content

Commit 2e93e04

Browse files
author
Andrews
committed
add regex validation to pre-config buckets; update README cli update instructions
1 parent 5141328 commit 2e93e04

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ aws-serverless-developer-portal is a reference implementation for a developer po
55
It also optionally supports subscription/unsubscription through a SaaS product offering through the AWS Marketplace.
66

77
## Setup
8-
First, ensure you have the latest AWS CLI installed (eg. `pip install --upgrade awscli`) http://docs.aws.amazon.com/cli/latest/userguide/installing.html.
8+
First, ensure you have the latest AWS CLI installed http://docs.aws.amazon.com/cli/latest/userguide/installing.html.
99

1010
```js
1111
npm install

pre-configure.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,18 @@ const questions = [{
1818
}, {
1919
name: 'artifactsS3BucketName',
2020
message: 'S3 bucket for artifacts such as Lambda package and Swagger file (will be created if it doesn\'t exist):',
21-
type: 'input'
21+
type: 'input',
22+
validate: value => /^[a-zA-Z0-9.\-_]{1,255}/.test(value)
2223
}, {
2324
name: 'clientS3BucketName',
2425
message: 'S3 bucket for website (will be created; do not provide existing bucket):',
25-
type: 'input'
26+
type: 'input',
27+
validate: value => /^[a-zA-Z0-9.\-_]{1,255}/.test(value)
2628
}, {
2729
name: 'cloudFormationStackName',
2830
message: 'CloudFormation stack name:',
2931
type: 'input',
30-
default: 'DevPortalStack'
32+
default: 'Dev Portal Stack'
3133
}, {
3234
name: 'apiGatewayApiName',
3335
message: 'API name:',

0 commit comments

Comments
 (0)