![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@cdklabs/cdk-ecs-codedeploy
Advanced tools
CDK Constructs for performing ECS Deployments with CodeDeploy
This project contains CDK constructs to create CodeDeploy ECS deployments.
yarn add @cdklabs/cdk-ecs-codedeploy
CodeDeploy for ECS can manage the deployment of new task definitions to ECS services. Only 1 deployment construct can be defined for a given EcsDeploymentGroup.
declare const deploymentGroup: codeDeploy.IEcsDeploymentGroup;
declare const taskDefinition: ecs.ITaskDefinition;
new EcsDeployment({
deploymentGroup,
targetService: {
taskDefinition,
containerName: 'mycontainer',
containerPort: 80,
},
});
The deployment will use the AutoRollbackConfig for the EcsDeploymentGroup unless it is overridden in the deployment:
declare const deploymentGroup: codeDeploy.IEcsDeploymentGroup;
declare const taskDefinition: ecs.ITaskDefinition;
new EcsDeployment({
deploymentGroup,
targetService: {
taskDefinition,
containerName: 'mycontainer',
containerPort: 80,
},
autoRollback: {
failedDeployment: true,
deploymentInAlarm: true,
stoppedDeployment: false,
},
});
By default, the deployment will timeout after 30 minutes. The timeout value can be overridden:
declare const deploymentGroup: codeDeploy.IEcsDeploymentGroup;
declare const taskDefinition: ecs.ITaskDefinition;
new EcsDeployment({
deploymentGroup,
targetService: {
taskDefinition,
containerName: 'mycontainer',
containerPort: 80,
},
timeout: Duration.minutes(60),
});
CodeDeploy can leverage Cloudwatch Alarms to trigger automatic rollbacks. The ApiCanary
construct simplifies the process for creating CloudWatch Synthetics Canaries to monitor APIs. The following code demonstrates a canary that monitors https://xkcd.com/908/info.0.json and checks the JSON response to assert that safe_title
has the value of 'The Cloud'
.
const canary = new ApiCanary(stack, 'Canary', {
baseUrl: 'https://xkcd.com',
durationAlarmThreshold: Duration.seconds(5),
threadCount: 5,
steps: [
{
name: 'info',
path: '/908/info.0.json',
jmesPath: 'safe_title',
expectedValue: 'The Cloud',
},
],
});
An L3 construct named ApplicationLoadBalancedCodeDeployedFargateService
extends ApplicationLoadBalancedFargateService and adds support for deploying new versions of the service with AWS CodeDeploy. Additionally, an Amazon CloudWatch Synthetic canary is created via the ApiCanary
construct and is monitored by the CodeDeploy deployment to trigger rollback if the canary begins to alarm.
declare const cluster: ecs.ICluster;
declare const image: ecs.ContainerImage;
const service = new ApplicationLoadBalancedCodeDeployedFargateService(stack, 'Service', {
cluster,
taskImageOptions: {
image,
},
apiTestSteps: [{
name: 'health',
path: '/health',
jmesPath: 'status',
expectedValue: 'ok',
}],
});
yarn install
yarn build
yarn test
To run an integration test and update the snapshot, run:
yarn integ:ecs-deployment:deploy
To recreate snapshots for integration tests, run:
yarn integ:snapshot-all
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.
FAQs
CDK Constructs for performing ECS Deployments with CodeDeploy
The npm package @cdklabs/cdk-ecs-codedeploy receives a total of 0 weekly downloads. As such, @cdklabs/cdk-ecs-codedeploy popularity was classified as not popular.
We found that @cdklabs/cdk-ecs-codedeploy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.