Expand description
§Rusty CDK
This crate is the main entry point for rusty-cdk. It combines and re-exports rusty-cdk-core and rusty-cdk-macros to provide a seamless experience for defining and deploying AWS infrastructure.
rusty-cdk is a safer alternative to the AWS CDK, written in Rust.
§Features
- Define Infrastructure in Rust: Use the power of Rust’s type system to define your AWS resources.
- Deploy, Diff, and Destroy: Provides the command-line logic to manage the lifecycle of your CloudFormation stacks.
- Safety: Leverages the Rust compiler to catch errors before deployment.
This crate is intended to be used as a library in your own binary crate that defines your infrastructure stack.
Modules§
- apigateway
- appconfig
- appsync
- cloudfront
- cloudwatch
- dynamodb
- events
- iam
- lambda
- s3
- secretsmanager
- shared
- sns
- sqs
- stack
- wrappers
- Type-safe wrapper types
Macros§
- app_
config_ name - Creates a validated
AppConfigNamewrapper for AWS AppConfig resource names at compile time. - app_
sync_ api_ name - Creates a validated
AppSyncApiNamewrapper for AppSync Api names at compile time. - bucket
- Creates a validated
Bucketwrapper for existing AWS S3 bucket references at compile time. - bucket_
name - Creates a validated
BucketNamewrapper for new AWS S3 bucket names at compile time. - bucket_
tiering - cf_
connection_ timeout - Creates a validated
CfConnectionTimeoutwrapper for CloudFront origin connection timeouts at compile time. - channel_
namespace_ name - Creates a validated
ChannelNamespaceNamewrapper for AppSync Api at compile time. - connection_
attempts - Checks whether the value that will be wrapped in the ConnectionAttempts struct is between 1 and 3
- default_
root_ object - Creates a validated
DefaultRootObjectwrapper for CloudFront default root objects at compile time. - delay_
seconds - Checks whether the value that will be wrapped in the DelaySeconds struct is between 0 and 900
- deployment_
duration_ in_ minutes - Checks whether the value that will be wrapped in the DeploymentDurationInMinutes struct is between 0 and 1440
- dto_
methods - Generated some methods that all resources have by passing in the resource name
- env_
var_ key - Creates a validated
EnvVarKeywrapper for AWS Lambda environment variable keys at compile time. - growth_
factor - Checks whether the value that will be wrapped in the GrowthFactor struct is between 0 and 100
- iam_
action - Creates a validated
IamActionwrapper for AWS IAM permissions at compile time. - lambda_
permission_ action - Creates a validated
LambdaPermissionActionwrapper for Lambda resource-based policy actions at compile time. - lifecycle_
object_ sizes - Creates a validated
S3LifecycleObjectSizeswrapper for S3 lifecycle rule object size constraints at compile time. - lifecycle_
transition_ in_ days - Creates a validated
LifecycleTransitionInDayswrapper for S3 lifecycle transition rules at compile time. - location_
uri - Creates a validated
LocationUriwrapper for AppConfig - log_
group_ name - Creates a validated
LogGroupNamewrapper for AWS CloudWatch Logs log group names at compile time. - log_
retention - Creates a validated
RetentionInDayswrapper for AWS CloudWatch Logs retention periods at compile time. - max_
flexible_ time_ window - Checks whether the value that will be wrapped in the MaxFlexibleTimeWindow struct is between 1 and 1440
- maximum_
message_ size - Checks whether the value that will be wrapped in the MaximumMessageSize struct is between 1024 and 1048576
- memory
- Checks whether the value that will be wrapped in the Memory struct is between 128 and 10240
- message_
retention_ period - Checks whether the value that will be wrapped in the MessageRetentionPeriod struct is between 60 and 1209600
- non_
zero_ number - Creates a validated
NonZeroNumberwrapper for positive integers at compile time. - origin_
path - Creates a validated
OriginPathwrapper for CloudFront origin path prefixes at compile time. - policy_
name - receive_
message_ wait_ time - Checks whether the value that will be wrapped in the ReceiveMessageWaitTime struct is between 0 and 20
- record_
expiration_ days - Checks whether the value that will be wrapped in the RecordExpirationDays struct is between 7 and 2147483647
- ref_
struct - Generated a ref struct, which is used to reference a given resource when you need it as a dependency of some other resource. To allow the other resources to depend on this one, the ref struct has methods for retrieving the Ref, ARN, and other attributes.
- ref_
struct_ with_ id_ methods - Generated a ref struct, which is used to reference a given resource when you need it as a dependency of some other resource. To allow the other resources to depend on this one, the ref struct has methods for retrieving the Ref, ARN, and other attributes.
- retry_
policy_ event_ age - Checks whether the value that will be wrapped in the RetryPolicyEventAge struct is between 60 and 86400
- retry_
policy_ retries - Checks whether the value that will be wrapped in the RetryPolicyRetries struct is between 0 and 185
- s3_
origin_ read_ timeout - Checks whether the value that will be wrapped in the S3OriginReadTimeout struct is between 1 and 120
- schedule_
at_ expression - schedule_
cron_ expression - schedule_
name - schedule_
rate_ expression - sqs_
event_ source_ max_ concurrency - Checks whether the value that will be wrapped in the SqsEventSourceMaxConcurrency struct is between 2 and 1000
- string_
for_ secret - Creates a validated
StringForSecretwrapper for AWS Secrets Manager secret names at compile time. - string_
with_ only_ alphanumerics_ and_ hyphens - Creates a validated
StringWithOnlyAlphaNumericsUnderscoresAndHyphenswrapper at compile time. - string_
with_ only_ alphanumerics_ and_ underscores - Creates a validated
StringWithOnlyAlphaNumericsAndUnderscoreswrapper at compile time. - string_
with_ only_ alphanumerics_ underscores_ and_ hyphens - Creates a validated
StringWithOnlyAlphaNumericsUnderscoresAndHyphenswrapper at compile time. - timeout
- Checks whether the value that will be wrapped in the Timeout struct is between 1 and 900
- toml_
file - Creates a validated
TomlFilewrapper. - type_
state - Pass in the trait name, followed by names for the state structs that should implement it Values separated by commas
- visibility_
timeout - Checks whether the value that will be wrapped in the VisibilityTimeout struct is between 0 and 43200
- zip_
file - Creates a validated
ZipFilewrapper for AWS Lambda deployment packages at compile time.
Enums§
Functions§
- deploy
- Deploys a stack to AWS using CloudFormation.
- deploy_
with_ result - Deploys a stack to AWS using CloudFormation.
- destroy
- Destroy a deployed stack
- destroy_
with_ result - Destroy a deployed stack
- diff
- Creates a diff that will show what ids are being added / removed to an existing stack, as well as showing ids that remain without being added or removed. Currently, the diff does not show modifications to resources.