Skip to content

[synthetics] Make it possible to set vpcConfig in synthetics.Canary for vpc private API testing #9954

@frjtrifork

Description

@frjtrifork

When creating a Canary using synthetics.Canary there is no way to set the vpc config which is needed for invocations of VPC-private APIs.

If you create the canary using CfnCanary you can configure the VpcConfig in the https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-synthetics.CfnCanaryProps.html

So there is a workaround, but by using CfnCanary you have to create the role, permission, s3 bucket (artifacts) etc. by hand also - so you end up with a lot of cdk code for even simple canaries.

Use Case

We have a number of VPC private APIs we would like to make canaries for.
Configuring api testing of vpc private api calls without this option when using the synthetics.Canary - and using CfnCanary is quite verbose / easy to get wrong in comparison to having the synthetics.Canary auto-create them.

Proposed Solution

Add vpcConfig option to the synthetics.CanaryProps

Other

If it is not an option to add vpc config to the synthetics.Canary, then please provide an example of how to use the vpc config in the CfnCanary.

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-syntheticsRelated to Amazon CloudWatch Syntheticseffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions