Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@aws-cdk/aws-service-spec

Package Overview
Dependencies
Maintainers
2
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-cdk/aws-service-spec

A specification of built-in AWS resources

Source
npmnpm
Version
0.1.104
Version published
Weekly downloads
156K
3.18%
Maintainers
2
Weekly downloads
 
Created
Source

AWS Service Spec

This package contains a definition of the AWS Resources available in CloudFormation.

Patching

Sometimes it is necessary to patch in certain aspects of the CloudFormation schema, as they are not always properly configured for our use cases. As such, we'll need to create a patch.

You can create a patch by following these steps:

  • Create a new patch file under build/patches/service-patches/my-module.ts (or use one of the existing patch files if it is for the same module).
  • If you created a new file, add it to build/patches/service-patches/index.ts.
  • Enter in the exact properties, attributes, resources, etc. that you wish to patch. You can refer to the existing patches for example, or the example down below:
import { forResource, fp, registerServicePatches, replaceDefinitionProperty } from './core';
import { patching } from '@aws-cdk/service-spec-importers';

const reason = patching.Reason.sourceIssue('Something in source was wrong');  // many root causes under `patching.Reason`

registerServicePatches(
  forResource('AWS::Service::Construct', (lens) => {
    replaceDefinitionProperty('SomeDefinition', 'SomeProperty', { type: 'integer' }, reason)(lens);
    replaceDefinition(
      'SomeDefinition',
      {
        type: 'string',
        properties : {
          X : {...},
          Y : {...},
          Z : {...},
        },
      },
      reason,
    )(lens);
    addDefinitions({newDefinition: "something something"}, reason)(lens);
    fp.removeFromReadOnlyProperties('AWS::Service::Construct', ['NotAReadOnlyProperty'], reason),
  }),
);

If you do not see your patching changes reflected, double check that there is not an existing legacy patch that may be overwriting your changes.

FAQs

Package last updated on 09 Oct 2025

Did you know?

Socket

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.

Install

Related posts