Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ ServerlessWebappStarterKitStack.FrontendDomainName = https://web.exmaple.com

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

> **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.

### WebApp Deployment

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.
Expand Down
2 changes: 1 addition & 1 deletion cdk/lib/constructs/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class Database extends Construct implements ec2.IConnectable {
host.instanceId
} --document-name AWS-StartPortForwardingSessionToRemoteHost --parameters '{"portNumber":["${
cluster.clusterEndpoint.port
}"], "localPortNumber":["${cluster.clusterEndpoint.port}"], "host": ["${cluster.clusterEndpoint.hostname}"]}'`,
}"], "localPortNumber":["5433"], "host": ["${cluster.clusterEndpoint.hostname}"]}'`,
});
new CfnOutput(this, 'DatabaseSecretsCommand', {
value: `aws secretsmanager get-secret-value --secret-id ${cluster.secret!.secretName} --region ${
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,7 @@ exports[`Snapshot test 2`] = `
"Endpoint.Port",
],
},
""], "localPortNumber":["",
{
"Fn::GetAtt": [
"DatabaseCluster5B53A178",
"Endpoint.Port",
],
},
""], "host": ["",
""], "localPortNumber":["5433"], "host": ["",
{
"Fn::GetAtt": [
"DatabaseCluster5B53A178",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,7 @@ exports[`Snapshot test 2`] = `
"Endpoint.Port",
],
},
""], "localPortNumber":["",
{
"Fn::GetAtt": [
"DatabaseCluster5B53A178",
"Endpoint.Port",
],
},
""], "host": ["",
""], "localPortNumber":["5433"], "host": ["",
{
"Fn::GetAtt": [
"DatabaseCluster5B53A178",
Expand Down