Skip to content

Commit

Permalink
docs: update notice about using aurora serverless v1 (#5622)
Browse files Browse the repository at this point in the history
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.
  • Loading branch information
Lou1415926 authored Jan 20, 2024
1 parent 295049a commit 3125ff2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 3 additions & 1 deletion internal/pkg/cli/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,9 @@ Must be of the format '<keyName>:<dataType>'.`
storageLSIConfigFlagDescription = `Optional. Attribute to use as an alternate sort key. May be specified up to 5 times.
Must be of the format '<keyName>:<dataType>'.`
storageAuroraServerlessVersionFlagDescription = `Optional. Aurora Serverless version.
Must be either "v1" or "v2".`
With "environment" lifecycle, use "v2".
With "workload" lifecycle, use "v1" or "v2".
`
storageRDSEngineFlagDescription = `The database engine used in the cluster.
Must be either "MySQL" or "PostgreSQL".`
storageRDSInitialDBFlagDescription = "The initial database to create in the cluster."
Expand Down
9 changes: 8 additions & 1 deletion site/content/docs/commands/storage-init.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ Aurora Serverless Flags
--initial-db string The initial database to create in the cluster.
--parameter-group string Optional. The name of the parameter group to associate with the cluster.
--serverless-version string Optional. Aurora Serverless version.
Must be either "v1" or "v2" (default "v2").
With "environment" lifecycle, use "v2".
With "workload" lifecycle, use "v1" or "v2".
(default "v2")
Optional Flags
--add-ingress-from string The workload that needs access to an
Expand All @@ -63,6 +65,11 @@ Optional Flags
Can be specified with "--engine".
```

!!!attention "Considerations when using Aurora Serverless v1 storage"
#### Aurora Serverless v1 is only supported for workload-level storage
If you want to create an Aurora Serverless v1 with "environment" lifecycle, please see [this example](https://github.com/aws/copilot-cli/discussions/5621).


## How can I use it?
Create an S3 bucket named "my-bucket" attached to the "frontend" service.

Expand Down
5 changes: 0 additions & 5 deletions site/content/docs/developing/storage.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ $ copilot storage init -n my-cluster -t Aurora -w api -l workload --engine Postg
```
This will create an RDS Aurora Serverless v2 cluster that uses PostgreSQL engine with a database named `my_db`. An environment variable named `MYCLUSTER_SECRET` is injected into your workload as a JSON string. The fields are `'host'`, `'port'`, `'dbname'`, `'username'`, `'password'`, `'dbClusterIdentifier'` and `'engine'`.

To create an [RDS Aurora Serverless v1](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.html) cluster, you can run
```console
$ copilot storage init -n my-cluster -t Aurora --serverless-version v1
```

### Environment storage

The `-l` flag is short for `--lifecycle`. In the examples above, the value to the `-l` flag is `workload`.
Expand Down

0 comments on commit 3125ff2

Please sign in to comment.