Canary
Provides a Synthetics Canary resource.
NOTE: When you create a canary, AWS creates supporting implicit resources. See the Amazon CloudWatch Synthetics documentation on DeleteCanary for a full list. Neither AWS nor this provider deletes these implicit resources automatically when the canary is deleted. Before deleting a canary, ensure you have all the information about the canary that you need to delete the implicit resources using the AWS Console, or AWS CLI.
Example Usage
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.synthetics.Canary;
import com.pulumi.aws.synthetics.CanaryArgs;
import com.pulumi.aws.synthetics.inputs.CanaryScheduleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var some = new Canary("some", CanaryArgs.builder()
.artifactS3Location("s3://some-bucket/")
.executionRoleArn("some-role")
.handler("exports.handler")
.runtimeVersion("syn-1.0")
.schedule(CanaryScheduleArgs.builder()
.expression("rate(0 minute)")
.build())
.zipFile("test-fixtures/lambdatest.zip")
.build());
}
}
Import
Synthetics Canaries can be imported using the name
, e.g.,
$ pulumi import aws:synthetics/canary:Canary some some-canary
Properties
ARN of the IAM role to be used to run the canary. see AWS Docs for permissions needs for IAM Role.
Runtime version to use for the canary. Versions change often so consult the Amazon CloudWatch documentation for the latest valid versions. Values include syn-python-selenium-1.0
, syn-nodejs-puppeteer-3.0
, syn-nodejs-2.2
, syn-nodejs-2.1
, syn-nodejs-2.0
, and syn-1.0
.