Skip to content

Commit 52e8dfc

Browse files
author
remote-swe-app[bot]
committed
Change port forwarding local port to 5433 and add operational commands documentation
1 parent dad0742 commit 52e8dfc

4 files changed

Lines changed: 5 additions & 17 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ ServerlessWebappStarterKitStack.FrontendDomainName = https://web.exmaple.com
8484

8585
Opening the URL in `FrontendDomainName` output, you can now try the sample app on your browser.
8686

87+
> **Note:** The deployment also outputs operational commands for database management. `DatabasePortForwardCommand` establishes a local connection to your RDS database on port 5433, and `DatabaseSecretsCommand` retrieves database credentials from AWS Secrets Manager.
88+
8789
### WebApp Deployment
8890

8991
The Next.js webapp is built and deployed during the CDK deployment process using [deploy-time-build](https://github.com/tmokmss/deploy-time-build). This approach ensures your application is containerized and deployed to AWS Lambda as part of the infrastructure deployment. See the [implementation](./cdk/lib/constructs/webapp.ts) for details.

cdk/lib/constructs/database.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class Database extends Construct implements ec2.IConnectable {
6767
host.instanceId
6868
} --document-name AWS-StartPortForwardingSessionToRemoteHost --parameters '{"portNumber":["${
6969
cluster.clusterEndpoint.port
70-
}"], "localPortNumber":["${cluster.clusterEndpoint.port}"], "host": ["${cluster.clusterEndpoint.hostname}"]}'`,
70+
}"], "localPortNumber":["5433"], "host": ["${cluster.clusterEndpoint.hostname}"]}'`,
7171
});
7272
new CfnOutput(this, 'DatabaseSecretsCommand', {
7373
value: `aws secretsmanager get-secret-value --secret-id ${cluster.secret!.secretName} --region ${

cdk/test/__snapshots__/serverless-fullstack-webapp-starter-kit-without-domain.test.ts.snap

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -338,14 +338,7 @@ exports[`Snapshot test 2`] = `
338338
"Endpoint.Port",
339339
],
340340
},
341-
""], "localPortNumber":["",
342-
{
343-
"Fn::GetAtt": [
344-
"DatabaseCluster5B53A178",
345-
"Endpoint.Port",
346-
],
347-
},
348-
""], "host": ["",
341+
""], "localPortNumber":["5433"], "host": ["",
349342
{
350343
"Fn::GetAtt": [
351344
"DatabaseCluster5B53A178",

cdk/test/__snapshots__/serverless-fullstack-webapp-starter-kit.test.ts.snap

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -372,14 +372,7 @@ exports[`Snapshot test 2`] = `
372372
"Endpoint.Port",
373373
],
374374
},
375-
""], "localPortNumber":["",
376-
{
377-
"Fn::GetAtt": [
378-
"DatabaseCluster5B53A178",
379-
"Endpoint.Port",
380-
],
381-
},
382-
""], "host": ["",
375+
""], "localPortNumber":["5433"], "host": ["",
383376
{
384377
"Fn::GetAtt": [
385378
"DatabaseCluster5B53A178",

0 commit comments

Comments
 (0)