1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
1
Hi and welcome :),
Yes, you can pass additional arguments to the class. See the following class definition as an example:
class Mktv2Stack(cdk.Stack): def __init__( self, scope: cdk.Construct, id_: str, *, database_dynamodb_billing_mode: dynamodb.BillingMode, api_lambda_reserved_concurrency: int, **kwargs: Any, ):
You can then call it from app.py
as follows:
Mktv2Stack( app, "Mktv2Stack-dev", env=cdk.Environment(account=ACCOUNT, region=REGION), api_lambda_reserved_concurrency=constants.DEV_API_LAMBDA_RESERVED_CONCURRENCY, database_dynamodb_billing_mode=constants.DEV_DATABASE_DYNAMODB_BILLING_MODE, )
I'd recommend to look at the Recommended AWS CDK project structure for Python applications blog post and Best practices for developing and deploying cloud infrastructure with the AWS CDK for additional examples and details.
répondu il y a 2 ans
Contenus pertinents
- demandé il y a un an
- demandé il y a un mois
- demandé il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 mois
- AWS OFFICIELA mis à jour il y a 10 mois
- AWS OFFICIELA mis à jour il y a 2 ans