{ "$schema": "./aws-deploy-recipe-schema.json", "Id": "AspNetAppElasticBeanstalkLinux", "Version": "1.0.2", "Name": "ASP.NET Core App to AWS Elastic Beanstalk on Linux", "DeploymentType": "CdkProject", "DeploymentBundle": "DotnetPublishZipFile", "CdkProjectTemplate": "../CdkTemplates/AspNetAppElasticBeanstalkLinux", "CdkProjectTemplateId": "netdeploy.AspNetAppElasticBeanstalkLinux", "ShortDescription": "Deploys your application directly to a Linux EC2 instance using AWS Elastic Beanstalk.", "Description": "This ASP.NET Core application will be built and deployed to AWS Elastic Beanstalk on Linux. Recommended if you want to deploy your application directly to EC2 hosts, not as a container image.", "TargetService": "AWS Elastic Beanstalk", "TargetPlatform": "Linux", "DisplayedResources": [ { "LogicalId": "RecipeBeanstalkEnvironment83CC12DE", "Description": "Application Endpoint" } ], "RecipePriority": 100, "RecommendationRules": [ { "Tests": [ { "Type": "MSProjectSdkAttribute", "Condition": { "Value": "Microsoft.NET.Sdk.Web" } }, { "Type": "MSProperty", "Condition": { "PropertyName": "TargetFramework", "AllowedValues": [ "netcoreapp3.1", "net5.0", "net6.0", "net7.0" ] } } ], "Effect": { "Pass": { "Include": true } } }, { "Tests": [ { "Type": "FileExists", "Condition": { "FileName": "Dockerfile" } } ], "Effect": { "Fail": { "PriorityAdjustment": 100, "Include": true } } }, { "Tests": [ { "Type": "MSPropertyExists", "Condition": { "PropertyName": "AWSProjectType" } } ], "Effect": { "Pass": { "Include": false }, "Fail": { "Include": true } } } ], "Categories": [ { "Id": "General", "DisplayName": "General", "Order": 10 }, { "Id": "Hosting", "DisplayName": "Hosting", "Order": 20 }, { "Id": "Platform", "DisplayName": "Platform", "Order": 30 }, { "Id": "RollingUpdates", "DisplayName": "Rolling updates & deployments", "Order": 40 }, { "Id": "Health", "DisplayName": "Health & Monitoring", "Order": 50 }, { "Id": "Compute", "DisplayName": "Compute", "Order": 60 }, { "Id": "LoadBalancer", "DisplayName": "LoadBalancer", "Order": 70 }, { "Id": "Permissions", "DisplayName": "Permissions", "Order": 80 }, { "Id": "VPC", "DisplayName": "VPC", "Order": 90 }, { "Id": "EnvVariables", "DisplayName": "Environment Variables", "Order": 100 } ], "OptionSettings": [ { "Id": "BeanstalkApplication", "Name": "Elastic Beanstalk Application", "Category": "General", "Description": "The Elastic Beanstalk application.", "Type": "Object", "TypeHint": "BeanstalkApplication", "AdvancedSetting": false, "Updatable": false, "ChildOptionSettings": [ { "Id": "CreateNew", "Name": "Create new Elastic Beanstalk application", "Description": "Do you want to create new application?", "Type": "Bool", "DefaultValue": true, "AdvancedSetting": false, "Updatable": false }, { "Id": "ApplicationName", "Name": "Application Name", "Description": "The Elastic Beanstalk application name.", "Type": "String", "DefaultValue": "{StackName}", "AdvancedSetting": false, "Updatable": false, "DependsOn": [ { "Id": "BeanstalkApplication.CreateNew", "Value": true } ], "Validators": [ { "ValidatorType": "Regex", "Configuration": { "Regex": "^[^/]{1,100}$", "AllowEmptyString": true, "ValidationFailedMessage": "Invalid Application Name. The Application name can contain up to 100 Unicode characters, not including forward slash (/)." } }, { "ValidatorType": "ExistingResource", "Configuration": { "ResourceType": "AWS::ElasticBeanstalk::Application" } } ] }, { "Id": "ExistingApplicationName", "Name": "Application Name", "Description": "The Elastic Beanstalk application name.", "Type": "String", "TypeHint": "ExistingBeanstalkApplication", "DefaultValue": "{StackName}", "AdvancedSetting": false, "Updatable": false, "DependsOn": [ { "Id": "BeanstalkApplication.CreateNew", "Value": false } ], "Validators": [ { "ValidatorType": "Regex", "Configuration": { "Regex": "^[^/]{1,100}$", "AllowEmptyString": true, "ValidationFailedMessage": "Invalid Application Name. The Application name can contain up to 100 Unicode characters, not including forward slash (/)." } } ] } ] }, { "Id": "BeanstalkEnvironment", "ParentSettingId": "BeanstalkApplication.ApplicationName", "Name": "Environment Name", "Category": "General", "Description": "The Elastic Beanstalk environment name.", "Type": "Object", "AdvancedSetting": false, "Updatable": false, "ChildOptionSettings": [ { "Id": "EnvironmentName", "ParentSettingId": "BeanstalkApplication.ApplicationName", "Name": "Environment Name", "Description": "The Elastic Beanstalk environment name.", "Type": "String", "DefaultValue": "{StackName}-dev", "AdvancedSetting": false, "Updatable": false, "Validators": [ { "ValidatorType": "Regex", "Configuration": { "Regex": "^[a-zA-Z0-9][a-zA-Z0-9-]{2,38}[a-zA-Z0-9]$", "ValidationFailedMessage": "Invalid Environment Name. The Environment Name Must be from 4 to 40 characters in length. The name can contain only letters, numbers, and hyphens. It can't start or end with a hyphen." } }, { "ValidatorType": "ExistingResource", "Configuration": { "ResourceType": "AWS::ElasticBeanstalk::Environment" } } ] } ] }, { "Id": "InstanceType", "Name": "EC2 Instance Type", "Category": "Compute", "Description": "The EC2 instance type of the EC2 instances created for the environment.", "Type": "String", "TypeHint": "InstanceType", "AdvancedSetting": true, "Updatable": true, "Validators": [ { "ValidatorType": "InstanceType" } ] }, { "Id": "EnvironmentType", "Name": "Environment Type", "Category": "General", "Description": "The type of environment to create; for example, a single instance for development work or load balanced for production.", "Type": "String", "DefaultValue": "SingleInstance", "AllowedValues": [ "SingleInstance", "LoadBalanced" ], "ValueMapping": { "SingleInstance": "Single Instance", "LoadBalanced": "Load Balanced" }, "AdvancedSetting": false, "Updatable": false }, { "Id": "LoadBalancerType", "Name": "Load Balancer Type", "Category": "LoadBalancer", "Description": "The type of load balancer for your environment.", "Type": "String", "DefaultValue": "application", "AllowedValues": [ "application", "classic", "network" ], "ValueMapping": { "application": "Application", "classic": "Classic", "network": "Network" }, "DependsOn": [ { "Id": "EnvironmentType", "Value": "LoadBalanced" } ], "AdvancedSetting": true, "Updatable": true }, { "Id": "ApplicationIAMRole", "Name": "Application IAM Role", "Category": "Permissions", "Description": "The Identity and Access Management (IAM) role that provides AWS credentials to the application to access AWS services.", "Type": "Object", "TypeHint": "IAMRole", "TypeHintData": { "ServicePrincipal": "ec2.amazonaws.com" }, "AdvancedSetting": false, "Updatable": false, "ChildOptionSettings": [ { "Id": "CreateNew", "Name": "Create New Role", "Description": "Do you want to create a new role?", "Type": "Bool", "DefaultValue": true, "AdvancedSetting": false, "Updatable": false }, { "Id": "RoleArn", "Name": "Existing Role ARN", "Description": "The ARN of the existing role to use.", "Type": "String", "TypeHint": "ExistingIAMRole", "TypeHintData": { "ServicePrincipal": "ec2.amazonaws.com" }, "AdvancedSetting": false, "Updatable": false, "DependsOn": [ { "Id": "ApplicationIAMRole.CreateNew", "Value": false } ], "Validators": [ { "ValidatorType": "Regex", "Configuration": { "Regex": "arn:.+:iam::[0-9]{12}:.+", "ValidationFailedMessage": "Invalid IAM Role ARN. The ARN should contain the arn:[PARTITION]:iam namespace, followed by the account ID, and then the resource path. For example - arn:aws:iam::123456789012:role/S3Access is a valid IAM Role ARN. For more information visit https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns" } } ] } ] }, { "Id": "ServiceIAMRole", "Name": "Service IAM Role", "Category": "Permissions", "Description": "A service role is the IAM role that Elastic Beanstalk assumes when calling other services on your behalf.", "Type": "Object", "TypeHint": "IAMRole", "TypeHintData": { "ServicePrincipal": "elasticbeanstalk.amazonaws.com" }, "AdvancedSetting": false, "Updatable": false, "ChildOptionSettings": [ { "Id": "CreateNew", "Name": "Create New Role", "Description": "Do you want to create a new role?", "Type": "Bool", "DefaultValue": true, "AdvancedSetting": false, "Updatable": false }, { "Id": "RoleArn", "Name": "Existing Role ARN", "Description": "The ARN of the existing role to use.", "Type": "String", "TypeHint": "ExistingIAMRole", "TypeHintData": { "ServicePrincipal": "elasticbeanstalk.amazonaws.com" }, "AdvancedSetting": false, "Updatable": false, "DependsOn": [ { "Id": "ServiceIAMRole.CreateNew", "Value": false } ], "Validators": [ { "ValidatorType": "Regex", "Configuration": { "Regex": "arn:.+:iam::[0-9]{12}:.+", "ValidationFailedMessage": "Invalid IAM Role ARN. The ARN should contain the arn:[PARTITION]:iam namespace, followed by the account ID, and then the resource path. For example - arn:aws:iam::123456789012:role/S3Access is a valid IAM Role ARN. For more information visit https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns" } } ] } ] }, { "Id": "EC2KeyPair", "Name": "Key Pair", "Category": "Permissions", "Description": "The EC2 key pair used to SSH into EC2 instances for the Elastic Beanstalk environment.", "Type": "String", "TypeHint": "EC2KeyPair", "DefaultValue": "", "AdvancedSetting": true, "Updatable": false, "Validators": [ { "ValidatorType": "Regex", "Configuration": { "Regex": "^(?! ).+(?