NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet · #3068 most downloaded on NuGet
The CDK Construct Library for AWS::CloudWatch (Stability: Stable)
Last release 3 years ago
no release in 18 months
Ships fairly regularly
a new release about every 2 weeks
Rarely documented
notes for 6 of the last 60 stable releases
39 versions withdrawn
withdrawn after publishing
127 years old
285 releases · first in 1900
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.
Nothing published for this version
Nothing published for this version
aws-codepipeline-actions: use SecretValue
core: The deprecated app.run() has been removed (use app.synth()).
clusterName from Services (#2980) (a6e4f6a)onXxx() methods (#2921) (ea10f0d), closes #2913@aws-cdk/cdk module was renamed to @aws-cdk/core, python: aws_cdk.core, java: the artifact cdk in groupId software.amazon.awscdk was renamed to core@aws-cdk/cdk.Duration instead of number, and were renamed to exclude any unit indication.app.run() has been removed (use app.synth()).CfnResource.options property was renamed to CfnResource.cfnOptions to avoid conflicts with properties introduced by derived classes.CfnXxx.cfnResourceTypeName is now CFN_RESOURCE_TYPE_NAME in generated CFN resources.ContextProvider is no longer designed to be extended. Use ContextProvider.getValue and ContextProvider.getKey as utilities.Context.getSsmParameter has been removed. Use ssm.StringParameter.valueFromLookupContext.getAvailabilityZones has been removed. Use stack.availabilityZonesContext.getDefaultAccount and getDefaultRegion have been removed an no longer available. Use the environment variables CDK_DEFAULT_ACCOUNT and CDK_DEFAULT_REGION instead.StackProps.autoRun was renamed to StackProps.autoSynth.CfnElement.refAsString renamed to ref of string type. The IResolvable version have been removed.IStringValue renamed to IStringProducerInclude renamed to CfnIncludeCfn prefix was added to the following types: CfnCreationPolicy, CfnResourceAutoScalingCreationPolicy, CfnResourceAutoScalingCreationPolicy, CfnDeletionPolicy, CfnUpdatePolicy, CfnAutoScalingRollingUpdate, CfnAutoScalingReplacingUpdate, CfnAutoScalingScheduledAction, CfnCodeDeployLambdaAliasUpdate, CfnTag CfnRuleAssertion, CfnDynamicReferencePropsdeepMerge is no longer exported.CfnOutputProps.export was renamed to exportName.CfnOutput all properties are now privateStringListCfnOutput has been removedFn were made static, and the Fn constructor was made private.VpcNetworkProvider has been removed. Use Vpc.fromLookup.ec2.MachineImage will now resolve AMIs from SSM during deployment.ecs.EcsOptimizedAmi will now resolve AMis from SSM during deployment.hardwareType was STANDARD. Now it always defaults to Amazon Linux v2.service.clusterName has been replaced with .cluster.requiredTransform is now REQUIRED_TRANSFORM in generated code.AwsCustomResource class was moved to a new module called @aws-cdk/custom-resourcecapabilities property is now an array to support multiple capabilities.Pipeline.crossRegionScaffoldStacks has been renamed to crossRegionSupport, and its type changed from CrossRegionScaffoldStack to CrossRegionSupport.CodeCommitAction.pollForSourceChanges to trigger and make it an enum.trigger, and make it an enum.CloudFormationAction and CloudFormationDeployAction.HostedZoneProvider has been removed. Use HostedZone.fromLookup.cli: Move version check TTL file to home directory
cdk context (#2870) (b8a1c8e), closes #2854name in StageProps to stageName. (#2882) (be574a1)hwType to hardwareType (#2916) (1aa0589), closes #2896aws-sns-subscribers (#2804) (9ef899c)AssetProps.packaging has been removed and is now automatically discovered based on the file type.ZipDirectoryAsset has been removed, use aws-s3-assets.Asset.FileAsset has been removed, use aws-s3-assets.Asset.Code.directory and Code.file have been removed. Use Code.asset.hardwareType from hwType.TableOptions.pitrEnabled renamed to pointInTimeRecovery.TableOptions.sseEnabled renamed to serverSideEncryption.TableOptions.ttlAttributeName renamed to timeToLiveAttribute.TableOptions.streamSpecification renamed stream.ContainerImage.fromAsset() now takes only build directory
directly (no need to pass scope or id anymore).ISecret.secretJsonValue renamed to secretValueFromJson.ParameterStoreString has been removed. Use StringParameter.fromStringParameterAttributes.ParameterStoreSecureString has been removed. Use StringParameter.fromSecureStringParameterAttributes.ParameterOptions.name was renamed to parameterName.newStream renamed to addStream and doesn't need a scopenewSubscriptionFilter renamed to addSubscriptionFilter and doesn't need a scopenewMetricFilter renamed to addMetricFilter and doesn't need a scopeNewSubscriptionFilterProps renamed to SubscriptionPropsNewLogStreamProps renamed to LogStreamOptionsNewMetricFilterProps renamed to MetricFilterOptionsJSONPattern renamed to JsonPatternMethodOptions.authorizerId is now called authorizer and accepts an IAuthorizer which is a placeholder interface for the authorizer resource.restapi.executeApiArn renamed to arnForExecuteApi.restapi.latestDeployment and deploymentStage are now read-only.EventPattern.detail is now a map.scheduleExpression: string is now schedule: Schedule.cdk.RemovalPolicy
to configure the resource's removal policy.applyRemovalPolicy is now CfnResource.applyRemovalPolicy.RemovalPolicy.Orphan has been renamed to Retain.RemovalPolicy.Forbid has been removed, use Retain.RepositoryProps.retain is now removalPolicy, and defaults to Retain instead of remove since ECR is a stateful resourceKeyProps.retain is now removalPolicyLogGroupProps.retainLogGroup is now removalPolicyLogStreamProps.retainLogStream is now removalPolicyDatabaseClusterProps.deleteReplacePolicy is now removalPolicyDatabaseInstanceNewProps.deleteReplacePolicy is now removalPolicyattr instead of the resource type. For example, in S3 bucket.bucketArn is now bucket.attrArn.propertyOverrides has been removed from all "Cfn" resources, instead
users can now read/write resource properties directly on the resource class. For example, instead of lambda.propertyOverrides.runtime just use lambda.runtime.stageName instead of nameFunction.addLayer to addLayers and made it variadicIFunction.handler propertyIVersion.versionArn property (the value is at functionArn)SingletonLayerVersionLogRetentionPolicyStatement no longer has a fluid API, and accepts a
props object to be able to set the important fields.ImportedResourcePrincipal to UnknownPrincipal.managedPolicyArns renamed to managedPolicies, takes
return value from ManagedPolicy.fromAwsManagedPolicyName().PolicyDocument.postProcess() is now removed.PolicyDocument.addStatement() renamed to addStatements.PolicyStatement is no longer IResolvable, call .toStatementJson()
to retrieve the IAM policy statement JSON.AwsPrincipal has been removed, use ArnPrincipal instead.s3.StorageClass is now an enum-like class instead of a regular
enum. This means that you need to call .value in order to obtain it's value.s3.Coordinates renamed to s3.LocationArtifact.s3Coordinates renamed to Artifact.s3Location.BuildSpec object.lambda.Runtime.NodeJS* are now lambda.Runtime.Nodejs*Stack APIstack.name renamed to stack.stackNamestack.stackName will return the concrete stack name. Use Aws.stackName to indicate { Ref: "AWS::StackName" }.stack.account and stack.region will return the concrete account/region only if they are explicitly specified when the stack is defined (under the env prop). Otherwise, they will return a token that resolves to the AWS::AccountId and AWS::Region intrinsic references. Use Context.getDefaultAccount() and Context.getDefaultRegion() to obtain the defaults passed through the toolkit in case those are needed. Use Token.isUnresolved(v) to check if you have a concrete or intrinsic.stack.logicalId has been removed. Use stack.getLogicalId()stack.env has been removed, use stack.account, stack.region and stack.environment insteadstack.accountId renamed to stack.account (to allow treating account more abstractly)AvailabilityZoneProvider can now be accessed through Context.getAvailabilityZones()SSMParameterProvider can now be accessed through Context.getSsmParameter()parseArn is now Arn.parsearnFromComponents is now arn.formatnode.lock and node.unlock are now privatestack.requireRegion and requireAccountId have been removed. Use Token.unresolved(stack.region) insteadstack.parentApp have been removed. Use App.isApp(stack.node.root) instead.stack.missingContext is now privatestack.renameLogical have been renamed to stack.renameLogicalIdIAddressingScheme, HashedAddressingScheme and LogicalIDs are now internal. Override Stack.allocateLogicalId to customize how logical IDs are allocated to resources.--rename, and the stack
names are now immutable on the stack artifact.@aws-cdk/aws-sns-subscribers
package.roleName in RoleProps is now of type PhysicalNamebucketName in BucketProps is now of type PhysicalNameroleName in RoleProps is now of type PhysicalNamecore: App.run() was renamed to App.synth() (soft deprecation, it will be removed in the next release).
aws-cloudwatch-actions (#2688) (e3df21a)recordValue: string prop in route53.TxtRecord changed to values: string[]recordValue prop in route53.CnameRecord renamed to domainNameroute53.AliasRecord has been removed, use route53.ARecord or route53.AaaaRecord with the target prop.EncryptionKeyAlias class was renamed to Alias.
Associated types (such as EncryptionKeyAliasProps) were renamed in the
same way.App.run() was renamed to App.synth() (soft deprecation, it will be removed in the next release).node.stack is now Stack.of(construct) (fixes #2766)node.resolve has been moved to stack.resolve.node.stringifyJson has been moved to stack.stringifyJson.node.validateTree is now ConstructNode.validate(node)node.prepareTree is now ConstructNode.prepare(node)node.getContext is now node.tryGetContextnode.recordReference is now node.addReferencenode.apply is now node.applyAspectnode.ancestors() is now node.scopesnode.required has been removed.node.typename has been removed.node.addChild is now privatenode.findReferences() is now node.referencesnode.findDependencies() is now node.dependenciesstack.dependencies() is now stack.dependenciesCfnElement.stackPath has been removed.CloudFormationLang is now internal (use stack.toJsonString())@aws-cdk/aws-cloudwatch-actions
package.targets.EcsEc2Task renamed to targets.EcsTaskendpoint is now type string (previously any)result in the Pass state is now type map (previously any)@aws-cdk/applet-js, @aws-cdk/aws-autoscaling-api, @aws-cdk/aws-codedeploy-apiaddPropertyOverride should match in capitalization to the CloudFormation schema (normally pascal case). For example, addPropertyOverride('accessControl', 'xxx') should now be addPropertyOverride('AccessControl', 'xxx').rds.RotationSingleUser renamed to rds.SecretRotationrds.ClusterParameterGroup no longer has setParameter() and removeParameter() methods, use the parameters prop directly in the constructor instead.IMPORTANT: apps created with the CDK version 0.33.0 and above cannot be used with an older CLI version.
IMPORTANT: apps created with the CDK version 0.33.0 and above cannot be used with an older CLI version.
cdk docs open the new API reference (#2633) (6450758)dependencyRoots from public API (#2668) (2ba5ad2), closes #2348noUnusedLocals and noUnusedParameters from typescript templates (#2654) (b061826)@aws-cdk/aws-logs-destinations package.addPutJobResultPolicy property when creating LambdaInvokeAction.--interactive has been removed--numbered has been removed--staging is now a boolean flag that indicates whether assets should be copied to the --output directory or directly referenced (--no-staging is useful for e.g. local debugging with SAM CLI)SynthUtils.templateForStackName has been removed (use SynthUtils.synthesize(stack).template).cxapi.SynthesizedStack renamed to cxapi.CloudFormationStackArtifact with multiple API changes.cdk.App.run() now returns a cxapi.CloudAssembly instead of cdk.ISynthesisSession.@aws-cdk/aws-s3-notifications package.@aws-cdk/aws-autoscaling-hooktargets package.EcsQueueWorkerService, FargateQueueWorkerService, LoadBalancedEcsService, LoadBalancedFargateService and LoadBalancedFargateServiceApplets.leftAxisRange => leftYAxis, rightAxisRange => rightYAxis, rename YAxisRange => YAxisProps.lambda: deprecate old Lambda runtimes
@aws-cdk/aws-route53-targets package.IBucket.arnForObject method no longer
concatenates path fragments on your behalf. Pass the /-concatenated
key pattern instead.export methods from all AWS resources have been removed. CloudFormation Exports are now automatically created when attributes are referenced across stacks within the same app. To export resources manually, you can explicitly define a CfnOutput.kms.EncryptionKey renamed to kms.Keyec2.VpcNetwork renamed to ec2.Vpcec2.VpcSubnet renamed to ec2.Subnetcloudtrail.CloudTrail renamed to cloudtrail.Trail`XxxAttribute and XxxImportProps interfaces which were no longer in used after their corresponding export method was deleted and there was no use for them in imports.ecs.ClusterAttributes now accepts IVpc and ISecurityGroup instead of attributes. You can use their
corresponding fromXxx methods to import them as needed.servicediscovery.CnameInstance.instanceCname renamed to cname.glue.IDatabase.locationUrl is now only in glue.Database (not on the interface)ec2.TcpPortFromAttribute and UdpPortFromAttribute removed. Use TcpPort and UdpPort with new Token(x).toNumber instead.ec2.VpcNetwork.importFromContext renamed to ec2.Vpc.fromLookupiam.IRole.roleId has been removed from the interface, but Role.roleId is still available for owned resources.loadBalancer property in ServerDeploymentGroupProps has been changed.apigateway.ResourceBase.trackChild is now internal.cloudfront.S3OriginConfig.originAccessIdentity is now originAccessIdentityIdcodedeploy.LambdaDeploymentGroup.alarms is now cloudwatch.IAlarm[] (previously cloudwatch.Alarm[])codepipeline.crossRegionScaffoldingStacks renamed to crossRegionScaffoldingcodepipeline.CrossRegionScaffoldingStack renamed to codepipeline.CrossRegionScaffolding and cannot be instantiated (abstract)ec2.VpcSubnet.addDefaultRouteToNAT renamed to addDefaultNatRoute and made publicec2.VpcSubnet.addDefaultRouteToIGW renamed to addDefaultInternetRoute, made public and first argument is the gateway ID (string) and not the CFN L1 classecs.Ec2EventRuleTarget.taskDefinition is now ITaskDefinition (previously TaskDefinition)lambda.IEventSource.bind now accepts IFunction instead of FunctionBase. Use IFunction.addEventSourceMapping to add an event source mapping under the function.lambda.Layer.grantUsage renamed to lambda.layer.addPermission and returns voidstepfunctions.StateMachine.role is now iam.IRole (previously iam.Role)onXxx() CloudWatch Event methods now have the signature:resource.onEvent('SomeId', {
target: new SomeTarget(...),
// options
});
onAlarm was renamed to addAlarmActiononOk was renamed to addOkActiononInsufficientData was renamed to addInsufficientDataActiononLifecycleTransition was renamed to addLifecycleHookonPreHook was renamed to addPreHookonPostHook was renamed to addPostHookonXxx were renamed to addXxxTriggeronImagePushed was renamed to onCloudTrailImagePushedonEvent was renamed to addEventNotificationonObjectCreated was renamed to addObjectCreatedNotificationonObjectRemoved was renamed to addObjectRemovedNotificationonPutObject was renamed to onCloudTrailPutObjectaws-ecs: expose readonly service on LoadBalancedEc2Service (#2395) (52af870), closes #2378
Foo.import static methods are now Foo.fromFooAttributesFooImportProps structs are now called FooAttributesstepfunctions.StateMachine.export has been removed.ses.ReceiptRule.name is now ses.ReceiptRule.receiptRuleNameses.ReceiptRuleSet.name is now ses.ReceiptRuleSet.receiptRuleSetNamesecretsmanager.AttachedSecret is now called secretsmanager.SecretTargetAttachment to match service semanticsecr.Repository.export has been removeds3.Bucket.bucketUrl is now called s3.Bucket.bucketWebsiteUrllambda.Version.functionVersion is now called lambda.Version.versionec2.SecurityGroup.groupName is now ec2.SecurityGroup.securityGroupNamecognito.UserPoolClient.clientId is now cognito.UserPoolClient.userPoolClientIdapigateway.IRestApiResource is now apigateway.IResourceapigateway.IResource.resourcePath is now apigateway.IResource.pathapigateway.IResource.resourceApi is now apigateway.IResource.restApiawslint: construct-base-is-private, resource-attribute (#2349) (973b506), closes #2426 #2409
s3.Bucket.domainName renamed to s3.Bucket.bucketDomainName.codedeploy.IXxxDeploymentConfig.deploymentConfigArn is now a property and not a method.ec2.SecurityGroupBase is now privateec2.VpcNetworkBase is now privatekinesis.StreamBase is now privatekms.EncryptionKeyBase is now privatelogs.LogGroupBase is now privatessm.ParameterBase is now privateeks.ClusterBase is now privatecodebuild.ProjectBase is now privatecodecommit.RepositoryBase is now privatecodedeploy.ServerDeploymentGroupBase is now privateeks.ClusterBase is now privatelambda.LayerVersionBase is now privaterds.DatabaseClusterBase is now privatesecretsmanager.SecretBase is now privateses.ReceiptRuleSetBase is now privatepollForSourceChanges property in GitHubSourceAction has been renamed to trigger, and its type changed from a boolean to an enum.acm: enabled validation of certificates on the zone name
app.run() (#2300) (47ff448), closes #2289 awslabs/jsii#456Code, CfnParametersCode. (#2027) (4247966)MetricCustomization to MetricOptions.outputArtifact and outputArtifacts properties.inputArtifact(s) and additionalInputArtifacts properties were renamed to input(s) and extraInputs.outputArtifactName(s) and additionalOutputArtifactNames properties were renamed to output(s) and extraOutputs.CodeBuildBuildAction and CodeBuildTestAction were merged into one class CodeBuildAction.JenkinsBuildAction and JenkinsTestAction were merged into one class JenkinsAction.lambda.Function no longer implements IEventRuleTarget. Instead, use @aws-cdk/aws-events-targets.LambdaFunction.sns.Topic no longer implements IEventRuleTarget. Use @aws-cdk/aws-events-targets.SnsTopic instead.codebuild.Project no longer implements IEventRuleTarget. Use @aws-cdk/aws-events-targets.CodeBuildProject.cdk.Root construct has been removed. Use cdk.App instead.stepfunctions.WaitProps: the props seconds, timestamp, secondsPath and timestampPath are now duration of a union-like class WaitDuration (e.g. duration: WaitDuration.seconds(n))codedeploy.ServerDeploymentConfigProps: the props minHealthyHostCount and minHealthyHostPercentage are now minimumHealthyHosts of union-like class MinimumHealthyHosts (e.g. minimumHealthyHosts: MinimumHealthyHosts.percentage(50))cloudformation.CustomResourceProps: the props topicProvider and lambdaProvider are now provider of union-like class CustomResourceProvider (e.g. CustomResourceProvider.lambda(fn)cloudformation.CustomResource no longer extends CfnCustomResource.ssm.ParameterProps renamed to ssm.ParameterOptions.aws-ec2.InstanceSize.None was renamed to InstanceSize.Nanovpc.selectSubnetIds(...) has been replaced with vpc.selectSubnets(...).subnetIds.aws-ecs: use executionRole for event rule target (#2165) (aa6f7bc), closes #2015
aws-ecs: use executionRole for event rule target (#2165) (aa6f7bc), closes #2015
feat(aws-iam): refactor grants, add OrganizationPrincipal (#1623) (1bb8ca9), closes #1623 #236
bind method to take a Role separately from the Pipeline. (#2085) (ffe0046)newVersion method. (#2099) (6fc179a)secretsmanager.SecretString class has been removed in favor of cdk.SecretValue.secretsManager(id[, options])string to cdk.SecretValue: codepipeline-actions.AlexaSkillDeployAction.clientSecret, codepipeline-actions.AlexaSkillDeployAction.refreshToken, codepipeline-actions.GitHubSourceAction.oauthToken, iam.User.passwordsecretsmanager.Secret.stringValue and jsonFieldValue have been removed. Use secretsmanage.Secret.secretValue and secretJsonValue instead.secretsmanager.Secret.secretString have been removed. Use cdk.SecretValue.secretsManager() or secretsmanager.Secret.import(..).secretValue.cdk.Secret has been removed. Use cdk.SecretValue instead.cdk.DynamicReference is no longer a construct, and it's constructor signature was changed and was renamed cdk.CfnDynamicReference.grant(function.role) and grant(project.role) are now grant(function) and grant(role).cdk.Secret with secretsmanager.SecretString (preferred) or ssm.ParameterStoreSecureString.Make sure to go through the BREAKING CHANGES section below
npx cdknpx cdk (#2113) (32bca05)cloudWatchLogsRetentionTimeDays in @aws-cdk/aws-cloudtrail
now uses a logs.RetentionDays instead of a LogRetention.stack._toCloudFormation method is now unavailable and is replaced by @aws-cdk/assert.SynthUtils.toCloudFormation(stack).kmsKeyArn: string by kmsKey: kms.IEncryptionKey in DatabaseClusterPropsVpcNetwork.isPublicSubnet() has been renamed to
VpcNetwork.isPublicSubnetIds().aws-serverless to aws-samvpcPlacement has been renamed to vpcSubnets
on all objects, subnetsToUse has been renamed to subnetType.
natGatewayPlacement has been renamed to natGatewaySubnets.aws-cdk: fix VpcNetwork.importFromContext() (#2008) (e1a1a7b), closes #1998
_toCloudFormation) (#2047) (515868b), closes #2044 #2016Database and Table (#1988) (3117cd3)ContainerImage.fromDockerHub has been renamed to ContainerImage.fromRegistry.aws-cloudtrail: correct created log policy when sendToCloudWatchLogs is true
awslint: Don't fail if the @aws-cdk/cdk module is not present
@aws-cdk/cdk module is not present (#1953) (929e854)viewerProtocolPolicy to the distribution's behaviors (#1932) (615ecd4)App API (#1919) (02f991d)toolkit: fix context passed in from command-line (#1939) (bec4a02), closes #1911
toolkit: Don't collect runtime information when versionReporting is disabled
construct.node.stack attribute (#1753) (a46cfd8), closes #798CloudTrail.addS3EventSelector accepts an options
object instead of only a ReadWriteType value.codedeploy.amazonaws.com)
yourself.parameter.valueAsString =>
parameter.stringValue, rename parameter.valueAsList =>
parameter.stringListValue, rename ssmParameter.parameterValue =>
ssmParameter.stringValue or ssmParameter.stringListValue depending
on type, rename secretString.value => secretString.stringValue,
rename secret.toSecretString() =>secret.secretStringStack.find(c) and Stack.tryFind(c) were
replaced by c.node.stack.partitionKey is now a required property when defining a
dynamodb.Table. The addPartitionKey and addSortKey methods have been removed.myConstruct.apply( ... ) to
myConstruct.node.apply( ... ).toCodePipelineAction.AutoScalingGroup, renamed minSize =>
minCapacity, maxSize => maxCapacity, for consistency with
desiredCapacity and also Application AutoScaling.
For ECS's addDefaultAutoScalingGroupCapacity(), instanceCount =>
desiredCapacity and the function now takes an ID (pass
"DefaultAutoScalingGroup" to avoid interruption to your deployments).reference documentation is missing
aws-ecs: correctly sets MinimumHealthyPercentage to 0 (#1661) (ce5966f), closes #1660
cdk.Tag has been renamed to cdk.CfnTag to enable cdk.Tag to be the Tag Aspect.apig: Move selectionPattern to integrationResponses (#1636) (7cdbcec), closes #1608
selectionPattern to integrationResponses (#1636) (7cdbcec), closes #1608roleName available on IRole (#1589) (9128390)role property in the CloudFormation Actions has been renamed to deploymentRole.role property in the app-delivery package has been renamed to deploymentRole.This is a major release with multiple breaking changes in the core layers. Please consult the __breaking changes__ section below for details.
This is a major release with multiple breaking changes in the core layers. Please consult the breaking changes section below for details.
We are focusing these days on finalizing the common patterns and APIs of the CDK framework and the AWS Construct Library, which is why you are seeing all these breaking changes. Expect a few more releases with changes of that nature as we stabilize these APIs, so you might want to hold off with upgrading. We will communicate when this foundational work is complete.
export() and import() to share constructs between stacks, you can stop doing that, instead of FooImportProps accept an IFoo directly on the consuming stack, and use that object as usual.ArnUtils.fromComponents() and ArnUtils.parse() have been moved onto Stack.AWS::AccountId etc) are now also accessible via Stack, as stack.accountId etc.Fn class (e.g. Fn.join(...) instead of new FnJoin(...).toString())resolve() has been moved to this.node.resolve().CloudFormationJSON.stringify() has been moved to this.node.stringifyJson(). validate() now should be protected.cloudformation.XxxResource classes have been removed. Use the CfnXxx classes instead.CfnXxx resource attributes that represented a list of strings are now typed as string[]s (via #1144). Attributes that represent strings, are still typed as string (#712) and all other attribute types are represented as cdk.Token.route53.TXTRecord class was renamed to route53.TxtRecord.zone when created (not assuming zone is the parent construct).lambda.FunctionRef to lambda.Function.XxxRef abstract classes are now IXxx interfacesXxxRefProps are now XxxImportPropsXxxRef.import(...) are now Xxx.import(...) accept XxxImportProps and return IXxxexport(): XxxImportProps is now defined in IXxx and implemented by imported resourcesdeprecate "cloudformation" namespace in favor of "CfnXxx" (#1311) (d20938c), closes #878 awslabs/jsii#283 awslabs/jsii#270
role property in CFN CodePipeline Actions
from Role to IRole. This is needed to use imported Roles when creating Actions.includeBuildID property of
S3BucketBuildArtifacts was renamed to includeBuildId (note the
lower-case trailing d).assert: Adjust assertion behavior to be stricter (#1289) (0919bf4), closes awslabs/cdk-ops#186
addToPipeline method to IRepository. (#1329) (c4a9b74)haveResource can cause tests to
fail. If allowing extension of the expected values is the intended behavior, you can
switch to the haveResourceLike matcher instead, which exposes the previous
behavior.aws-cdk: add '-h' flag to bring up help (#1274) (47dafb0), closes #1259
ecr.RepositoryRef has been replaced by ecr.IRepository, which
means that RepositoryRef.import is now Repository.import. Futhermore, the CDK
Toolkit must also be upgraded since the docker asset protocol was modified.
IRepository.grantUseImage was renamed to IRepository.grantPull.addBuildToPipeline was renamed to addToPipeline
and addTestToPipeline was renamed to addPipelineToTest in order to align
with naming conventions.CloudFormationCapabilities.IAM renamed to
CloudFormation.AnonymousIAM and PipelineCloudFormationDeployActionProps.capabilities?: CloudFormationCapabilities[] has been changed to
PipelineCloudFormationDeployActionProps.capabilities?: CloudFormationCapabilities no longer an array.
PipelineCloudFormationDeployActionProps.fullPermissions?: has been
renamed to PipelineCloudFormationDeployActionProps.adminPermissions:
and is required instead of optional.<a name="0.18.1"></a>
aws-cdk: make bootstrapping not require --app (#1191) (c7b1004), closes #1188
cdk bootstrap output (#1176) (b83fe85)targetGroup.listenerDependency() has been renamed to targetGroup.loadBalancerDependency().aws-ecs: remove DockerHub constructor class
addToPipeline method to Deployment Group. (#1166) (bdbeb7c)DockerHub.image() to reference docker hub images, use ContainerImage.fromDockerHub() instead.aws-elasticloadbalancingv2: listener dependency (#1146) (e9d3d93), closes #1139
correctly emit quoted YAML for account numbers (#1105) (b4d9155), closes #1100 #1098
Update peer dependencies to refer to correct version so NPM installs don't fail.
aws-autoscaling: allow minSize to be set to 0
js-yaml to yaml (#1092) (0b132b5)securityGroup to securityGroups (an array of security group objects).The schema now looks like this:
applets:
MyApplet:
type: ./my-applet-file
properties:
property1: value
...
By starting an applet specifier with npm://, applet modules can directly be referenced in NPM. You can include a version specifier (@1.2.3) to reference specific versions.
queue.grantReceiveMessages has been removed. It is unlikely that this would be sufficient to interact with a queue. Alternatively you can use queue.grantConsumeMessages or queue.grant('sqs:ReceiveMessage') if there's a need to only grant this action.aws-cdk: fix bug in SSM Parameter Provider
IMPORTANT NOTE: when upgrading to this version of the CDK framework, you must also upgrade your installation the CDK Toolkit to the matching version:
IMPORTANT NOTE: when upgrading to this version of the CDK framework, you must also upgrade your installation the CDK Toolkit to the matching version:
$ npm i -g aws-cdk
$ cdk --version
0.14.0 (build ...)
addReadAutoScaling(), call autoScaleReadCapacity(), and similar for write scaling.XxxName properties back into Name. These will match the CloudFormation property names.aws-cdk toolkit when upgrading to this version, or context providers will cease to work. All existing cached context values in cdk.json will be invalidated and refreshed.A new construct library for AWS Step Functions (docs). The library provides rich APIs for modeling state machines by exposing a programmatic interface
proxy: false and construct more complex resource paths yourself.lambda.InlineJavaScriptLambda is no longer supported. Use lambda.Code.inline instead; lambda.Runtime.NodeJS43Edge runtime is removed. CloudFront docs stipulate that you should use node6.10 or node8.10. It is always possible to use any value by instantiating a lambda.Runtime object.aws-codepipeline: this commit contains the following breaking changes:
IMPORTANT NOTE: This release includes a fix for a bug that would make the toolkit unusable for multi-stack applications. In order to benefit from this fix, a globally installed CDK toolkit must also be updated:
$ npm i -g aws-cdk
$ cdk --version
0.12.0 (build ...)
Like always, you will also need to update your project's library versions:
| Language | Update? |
|---|---|
| JavaScript/TypeScript (npm) | npx npm-check-updates -u |
| Java (maven) | mvn versions:use-latest-versions |
| .NET (NuGet) | nuget update |
aws-codepipeline: this commit contains the following breaking changes:
Previously, we always required customers to explicitly name the output artifacts the Actions used in the Pipeline, and to explicitly "wire together" the outputs of one Action as inputs to another. With this change, the CodePipeline Construct generates artifact names, if the customer didn't provide one explicitly, and tries to find the first available output artifact to use as input to a newly created Action that needs it, thus turning both the input and output artifacts from required to optional properties.
IMPORTANT NOTE: This release includes a breaking change in the toolkit <=> app protocol. This means that in order to synthesize CDK apps that use this…
IMPORTANT NOTE: This release includes a breaking change in the toolkit <=> app protocol. This means that in order to synthesize CDK apps that use this version, the globally installed CDK toolkit must also be updated:
$ npm i -g aws-cdk
$ cdk --version
0.11.0 (build ...)
Like always, you will also need to update your project's library versions:
| Language | Update? |
|---|---|
| JavaScript/TypeScript (npm) | npx npm-check-updates -u |
| Java (maven) | mvn versions:use-latest-versions |
| .NET (NuGet) | nuget update |
framework: The cdk.App constructor doesn't accept any arguments, and app.run() does not return a string anymore. All AWS CDK apps in all languages would need to be modified to adhere to the new API of the cdk.App construct.
Instead of:
const app = new App(process.argv); // ERROR
// add stacks
process.stdout.write(app.run()); // ERROR
The new usage is:
const app = new App();
// add stacks
app.run();
framework: The CDK is no longer shipped with built-in support for JSX. You can still use JSX but you will have to manually configure it.
aws-iam: PolicyDocument, PolicyStatement and all PolicyPrincipal classes moved from the @aws-cdk/cdk module and into the @aws-cdk/aws-iam module.
aws-codepipeline-api: Artifact.subartifact method of the CodePipeline API was renamed to Artifact.atPath.
constructor signature of TagManager has changed. initialTags is now passed inside a props object.
util: @aws-cdk/util is no longer available
aws-elasticloadbalancingv2: Adds classes for modeling Application and Network Load Balancers. AutoScalingGroups now implement the interface that makes constructs a load balancing target. The breaking change is that Security Group rule identifiers have been changed in order to make adding rules more reliable. No code changes are necessary but existing deployments may experience unexpected changes.
aws-cloudformation: this renames all CloudFormation Actions for CodePipeline to bring them in line with Actions defined in other service packages.
aws-codepipeline, aws-codecommit, aws-s3: change the names of the source Actions from XxxSource to XxxSourceAction. This is to align them with the other Actions, like Build. Also, CodeBuild has the concept of Sources, so it makes sense to strongly differentiate between the two.
AutoScalingGroups now implement the interface that makes constructs a load balancing target. The breaking change is that Security Group rule identifie…
This release introduces a better way to "escape" L2 constructs in case of missing features by adding the ability to add arbitrary overrides for resource properties:
const bucket = new s3.Bucket(this, 'L2Bucket');
// access L1
const bucketResource = bucket.findChild('Resource') as s3.cloudformation.BucketResource;
// strongly-typed overrides
bucketResource.propertyOverrides.bucketName = 'amzn-s3-demo-bucket';
// weakly-typed overrides
bucketResource.addPropertyOverride('BucketName', 'amzn-s3-demo-bucket1');
TagManager has changed. initialTags is now passed inside a props object.@aws-cdk/util is no longer available@aws-cdk/cfnspec: Updated [CloudFormation resource specification] to v2.8.0 ([@RomainMuller] in #767)
New Construct Libraries
@aws-cdk/aws-amazonmq@aws-cdk/aws-iot1clickNew Resource Types
Attribute Changes
Property Changes
AWS::ApiGateway::Deployment DeploymentCanarySettings (added)
AWS::ApiGateway::Method AuthorizationScopes (added)
AWS::ApiGateway::Stage AccessLogSetting (added)
AWS::ApiGateway::Stage CanarySetting (added)
AWS::AutoScaling::AutoScalingGroup LaunchTemplate (added)
AWS::CodeBuild::Project LogsConfig (added)
AWS::CodeBuild::Project SecondaryArtifacts (added)
AWS::CodeBuild::Project SecondarySources (added)
AWS::CodeDeploy::DeploymentGroup Ec2TagSet (added)
AWS::CodeDeploy::DeploymentGroup OnPremisesTagSet (added)
AWS::EC2::FlowLog LogDestination (added)
AWS::EC2::FlowLog LogDestinationType (added)
AWS::EC2::FlowLog DeliverLogsPermissionArn.Required (changed)
AWS::EC2::FlowLog LogGroupName.Required (changed)
AWS::EC2::VPCEndpoint IsPrivateDnsEnabled (deleted)
AWS::EC2::VPCEndpoint PrivateDnsEnabled (added)
AWS::EC2::VPCEndpoint RouteTableIds.DuplicatesAllowed (added)
AWS::EC2::VPCEndpoint SecurityGroupIds.DuplicatesAllowed (added)
AWS::EC2::VPCEndpoint SubnetIds.DuplicatesAllowed (added)
AWS::EC2::VPCEndpoint VPCEndpointType.UpdateType (changed)
AWS::ECS::Service SchedulingStrategy (added)
AWS::ECS::Service ServiceRegistries.UpdateType (changed)
AWS::ElastiCache::ReplicationGroup NodeGroupConfiguration.UpdateType (changed)
AWS::ElastiCache::ReplicationGroup NumNodeGroups.UpdateType (changed)
AWS::RDS::DBCluster EngineMode (added)
AWS::RDS::DBCluster ScalingConfiguration (added)
AWS::SageMaker::NotebookInstance LifecycleConfigName.UpdateType (changed)
Property Type Changes
AWS::ApiGateway::Deployment.AccessLogSetting (added)
AWS::ApiGateway::Deployment.CanarySetting (added)
AWS::ApiGateway::Deployment.DeploymentCanarySettings (added)
AWS::ApiGateway::Stage.AccessLogSetting (added)
AWS::ApiGateway::Stage.CanarySetting (added)
AWS::AutoScaling::AutoScalingGroup.LaunchTemplateSpecification (added)
AWS::CodeBuild::Project.CloudWatchLogsConfig (added)
AWS::CodeBuild::Project.LogsConfig (added)
AWS::CodeBuild::Project.S3LogsConfig (added)
AWS::CodeDeploy::DeploymentGroup.EC2TagSet (added)
AWS::CodeDeploy::DeploymentGroup.EC2TagSetListObject (added)
AWS::CodeDeploy::DeploymentGroup.OnPremisesTagSet (added)
AWS::CodeDeploy::DeploymentGroup.OnPremisesTagSetListObject (added)
AWS::EC2::SpotFleet.ClassicLoadBalancer (added)
AWS::EC2::SpotFleet.ClassicLoadBalancersConfig (added)
AWS::EC2::SpotFleet.FleetLaunchTemplateSpecification (added)
AWS::EC2::SpotFleet.LaunchTemplateConfig (added)
AWS::EC2::SpotFleet.LaunchTemplateOverrides (added)
AWS::EC2::SpotFleet.LoadBalancersConfig (added)
AWS::EC2::SpotFleet.TargetGroup (added)
AWS::EC2::SpotFleet.TargetGroupsConfig (added)
AWS::ECS::TaskDefinition.DockerVolumeConfiguration (added)
AWS::ECS::TaskDefinition.RepositoryCredentials (added)
AWS::ECS::TaskDefinition.Tmpfs (added)
AWS::Events::Rule.SqsParameters (added)
AWS::RDS::DBCluster.ScalingConfiguration (added)
AWS::ApiGateway::Deployment.StageDescription AccessLogSetting (added)
AWS::ApiGateway::Deployment.StageDescription CanarySetting (added)
AWS::ApiGateway::Method.Integration ConnectionId (added)
AWS::ApiGateway::Method.Integration ConnectionType (added)
AWS::ApiGateway::Method.Integration TimeoutInMillis (added)
AWS::ApiGateway::UsagePlan.ApiStage Throttle (added)
AWS::CodeBuild::Project.Artifacts ArtifactIdentifier (added)
AWS::CodeBuild::Project.Source SourceIdentifier (added)
AWS::CodeBuild::Project.VpcConfig SecurityGroupIds.Required (changed)
AWS::CodeBuild::Project.VpcConfig Subnets.Required (changed)
AWS::CodeBuild::Project.VpcConfig VpcId.Required (changed)
AWS::CodeDeploy::DeploymentGroup.EC2TagFilter Key.Documentation (changed)
AWS::CodeDeploy::DeploymentGroup.EC2TagFilter Type.Documentation (changed)
AWS::CodeDeploy::DeploymentGroup.EC2TagFilter Value.Documentation (changed)
AWS::CodeDeploy::DeploymentGroup.TagFilter Key.Documentation (changed)
AWS::CodeDeploy::DeploymentGroup.TagFilter Type.Documentation (changed)
AWS::CodeDeploy::DeploymentGroup.TagFilter Value.Documentation (changed)
AWS::EC2::SpotFleet.SpotFleetRequestConfigData InstanceInterruptionBehavior (added)
AWS::EC2::SpotFleet.SpotFleetRequestConfigData LaunchTemplateConfigs (added)
AWS::EC2::SpotFleet.SpotFleetRequestConfigData LoadBalancersConfig (added)
AWS::EC2::SpotFleet.SpotPlacement Tenancy (added)
AWS::ECS::Service.ServiceRegistry ContainerName (added)
AWS::ECS::Service.ServiceRegistry ContainerPort (added)
AWS::ECS::Service.ServiceRegistry Port.UpdateType (changed)
AWS::ECS::Service.ServiceRegistry RegistryArn.UpdateType (changed)
AWS::ECS::TaskDefinition.ContainerDefinition RepositoryCredentials (added)
AWS::ECS::TaskDefinition.LinuxParameters SharedMemorySize (added)
AWS::ECS::TaskDefinition.LinuxParameters Tmpfs (added)
AWS::ECS::TaskDefinition.Volume DockerVolumeConfiguration (added)
AWS::ElastiCache::ReplicationGroup.NodeGroupConfiguration NodeGroupId (added)
AWS::Events::Rule.Target SqsParameters (added)
AWS::RDS::OptionGroup.OptionConfiguration OptionSettings.DuplicatesAllowed (added)
AWS::RDS::OptionGroup.OptionConfiguration OptionSettings.ItemType (added)
AWS::RDS::OptionGroup.OptionConfiguration OptionSettings.Type (changed)
NOTICE: This release includes a framework-wide breaking change which changes the type of all the string resource attributes across the framework. Inst…
NOTICE: This release includes a framework-wide breaking change which changes the type of all the string resource attributes across the framework. Instead of using strong-types that extend cdk.Token (such as QueueArn, TopicName, etc), we now represent all these attributes as normal strings, and codify the tokens into the string (using the feature introduced in #168).
Furthermore, the cdk.Arn type has been removed. In order to format/parse ARNs, use the static methods on cdk.ArnUtils.
See motivation and discussion in #695.
addPartitionKey and addSortKey methods to be consistent across the board. (#720) (e6cc189)policy argument (#730) (a79190c), closes #672aws-cdk: Fix proxy support for account lookup (#693) (5468225), closes #645
The headliners of this release are .NET support, and a wealth of commits by external contributors who are stepping up to fix the CDK for their use cas
The headliners of this release are .NET support, and a wealth of commits by external contributors who are stepping up to fix the CDK for their use cases! Thanks all for the effort put into this release!
cdk init template for C# projects ([@mpiroc] in #617, #643).addBuildToPipeline on Project ([@skinny85] in 783dcb3).addToPipeline on Repository ([@skinny85] in #616).InstanceSize.Nano ([@rix0rrr] in #581)extractMetric() helper function ([@rix0rrr] in #676).addToPipeline on Bucket ([@skinny85] in c8b7a49)..ref attributes ([@rix0rrr] in #627).any to Arn, for example) to reduce typing mistakes ([@rix0rrr] in #629).export()/import() capabilities ([@rix0rrr] in #630).QueueRef.encryptionMasterKey readonly ([@RomainMuller] in #650).cdk init ([@rix0rrr] in #587).@aws-cdk/cfnspec: Updated [CloudFormation resource specification] to v2.6.0 ([@RomainMuller] in #594)
New AWS Construct Library
@aws-cdk/aws-sagemaker supports AWS::SageMaker resourcesNew Resource Types
Attribute Changes
Property Changes
AWS::AppSync::DataSource HttpConfig (added)
AWS::DAX::Cluster SSESpecification (added)
AWS::DynamoDB::Table Stream (added)
AWS::DynamoDB::Table AutoScalingSupport (added)
AWS::EC2::VPCEndpoint IsPrivateDnsEnabled (added)
AWS::EC2::VPCEndpoint SecurityGroupIds (added)
AWS::EC2::VPCEndpoint SubnetIds (added)
AWS::EC2::VPCEndpoint VPCEndpointType (added)
AWS::EC2::VPCEndpoint RouteTableIds.DuplicatesAllowed (deleted)
AWS::EC2::VPCPeeringConnection PeerRegion (added)
AWS::EFS::FileSystem ProvisionedThroughputInMibps (added)
AWS::EFS::FileSystem ThroughputMode (added)
AWS::EMR::Cluster KerberosAttributes (added)
AWS::Glue::Classifier JsonClassifier (added)
AWS::Glue::Classifier XMLClassifier (added)
AWS::Glue::Crawler Configuration (added)
AWS::Lambda::Lambda DLQConfigurationSupport (added)
AWS::Neptune::DBInstance DBSubnetGroupName.UpdateType (changed)
AWS::SNS::Subscription DeliveryPolicy (added)
AWS::SNS::Subscription FilterPolicy (added)
AWS::SNS::Subscription RawMessageDelivery (added)
AWS::SNS::Subscription Region (added)
AWS::SQS::Queue Tags (added)
AWS::ServiceDiscovery::Service HealthCheckCustomConfig (added)
Property Type Changes
AWS::AppSync::DataSource.HttpConfig (added)
AWS::DAX::Cluster.SSESpecification (added)
AWS::EMR::Cluster.KerberosAttributes (added)
AWS::Glue::Classifier.JsonClassifier (added)
AWS::Glue::Classifier.XMLClassifier (added)
AWS::ServiceDiscovery::Service.HealthCheckCustomConfig (added)
AWS::CloudFront::Distribution.CacheBehavior FieldLevelEncryptionId (added)
AWS::CloudFront::Distribution.DefaultCacheBehavior FieldLevelEncryptionId (added)
AWS::CodeBuild::Project.Artifacts EncryptionDisabled (added)
AWS::CodeBuild::Project.Artifacts OverrideArtifactName (added)
AWS::CodeBuild::Project.Environment Certificate (added)
AWS::CodeBuild::Project.Source ReportBuildStatus (added)
AWS::ServiceDiscovery::Service.DnsConfig RoutingPolicy (added)
AWS::WAF::WebACL.ActivatedRule Action.Required (changed)
@aws-cdk/cfnspec: Updated Serverless Application Model (SAM) Resource Specification ([@RomainMuller] in #594)
Property Changes
Property Type Changes
AWS::Serverless::Function.SQSEvent (added)
AWS::Serverless::Function.EventSource Properties.Types (changed)
Your coding agent can read these notes before it upgrades. Set up the MCP server →