You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/content/docs/cicd.md
+59-6Lines changed: 59 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,17 +8,68 @@ To turn off the interactive features, use the `-s (--silent)` switch. This will
8
8
9
9
dotnet aws deploy --silent
10
10
11
-
### Creating a deployment setting file
11
+
### Creating a deployment settings file
12
12
13
-
To specify the services to deploy and their configurations for your environment, you need to create deployment settings file. The deployment settings file is a JSON configuration file that contains all of the settings that the deployment tool uses to drive the experience. Here is the [JSON file definition](https://github.com/aws/aws-dotnet-deploy/tree/main/src/AWS.Deploy.Recipes/RecipeDefinitions).
13
+
You can persist the deployment configuration to a JSON file using the `--save-settings <SETTINGS_FILE_PATH)>` switch. This JSON file can be version controlled and plugged into your CI/CD system for future deployments.
14
14
15
-
Storing deployment settings in a JSON file also allows those settings to be version controlled.
15
+
**Note** - The `--save-settings` switch will only persist settings that have been modified (which means they hold a non-default value). To persist all settings use the `--save-all-settings` switch.
This will create a JSON file at `MyWebApplication/MyWebApplication/deploymentsettings.json` with the following structure:
46
+
```
47
+
{
48
+
"AWSProfile": <AWS_PROFILE>
49
+
"AWSRegion": <AWS_REGION>,
50
+
"ApplicationName": <APPLICATION_NAME>,
51
+
"RecipeId": <RECIPE_ID>
52
+
"Settings": <JSON_BLOB>
53
+
}
54
+
55
+
```
56
+
*_**AWSProfile**_: The name of the AWS profile that was used during deployment.
57
+
58
+
*_**AWSRegion**_: The name of the AWS region where the deployed application is hosted.
59
+
60
+
*_**ApplicationName**_: The name that is used to identify your cloud application within AWS. If the application is deployed via AWS CDK, then this name points to the CloudFormation stack.
61
+
62
+
*_**RecipeId**_: The recipe identifier that was used to deploy your application to AWS.
63
+
64
+
*_**Settings**_: This is a JSON blob that stores the values of all available settings that can be tweaked to adjust the deployment configuration.
16
65
17
66
### Invoking from CI/CD
18
67
19
-
The `--apply` switch on deploy command allows you to specify a deployment settings file.
68
+
The `--apply` switch on the deploy command allows you to specify a deployment settings file.
20
69
21
-
Deployment settings file path is always relative to the `--project-path`. Here's an example of a web application with the following directory structure:
Inspects the project and recommends AWS compute that is most suited to the type of deployed application. Then builds the project, generates a deployment CDK project to provision the required infrastructure, and deploys the .NET project to AWS using the chosen AWS compute.
**Resolution**: Open the AWS Console, go to S3 service, and manually delete the 'CDKToolkit' S3 bucket. Once the bucket is deleted, go ahead and deploy your application.
99
+
100
+
## MemorySize Constraint for Blazor WebAssembly
101
+
When attempting to deploy using the Blazor WebAssembly App recipe, you may see a deployment failure such as:
102
+
```
103
+
Resource handler returned message: "'MemorySize' value failed to satisfy constraint: Member must have value less than or equal to 3008
104
+
```
105
+
106
+
**Why this is happening:** The [BucketDeployment](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_s3_deployment.BucketDeployment.html) CDK Construct used to deploy the Blazor recipe uses an AWS Lambda function to replicate the application files from the CDK bucket to the deployment bucket. In some versions of the deploy tool the default memory limit for this Lambda function exceeded the 3008MB quota placed on new AWS accounts.
107
+
108
+
**Resolution:** See [Lambda: Concurrency and memory quotas](https://docs.aws.amazon.com/lambda/latest/dg/troubleshooting-deployment.html#troubleshooting-deployment-quotas) for how to request a quota increase.
Copy file name to clipboardExpand all lines: src/AWS.Deploy.CLI/Commands/CommandFactory.cs
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,8 @@ public class CommandFactory : ICommandFactory
47
47
privatestaticreadonlyOption<string>_optionOutputDirectory=new(new[]{"-o","--output"},"Directory path in which the CDK deployment project will be saved.");
48
48
privatestaticreadonlyOption<string>_optionProjectDisplayName=new(new[]{"--project-display-name"},"The name of the deployment project that will be displayed in the list of available deployment options.");
49
49
privatestaticreadonlyOption<string>_optionDeploymentProject=new(new[]{"--deployment-project"},"The absolute or relative path of the CDK project that will be used for deployment");
50
+
privatestaticreadonlyOption<string>_optionSaveSettings=new(new[]{"--save-settings"},"The absolute or the relative JSON file path where the deployment settings will be saved. Only the settings modified by the user will be persisted");
51
+
privatestaticreadonlyOption<string>_optionSaveAllSettings=new(new[]{"--save-all-settings"},"The absolute or the relative JSON file path where the deployment settings will be saved. All deployment settings will be persisted");
// if the recommendation is specified via a config file then find the deployed application by matching the deployment type along with the cloudApplicationName
0 commit comments