Je suis encore un débutant avec les services AWS.Est-il possible d'ajouter des configurations de notification aux compartiments S3 existants à l'aide de CFT?
Je voudrais ajouter un déclencheur Lambda sur un seau S3 existant en utilisant un CFT. Est-ce possible?
Lorsque je crée un CFT dans ce qui suit, il tente de créer un nouveau compartiment S3 et d'y ajouter une notification d'événement.
S3BUCKET_NOTIFCATION = Bucket(
"S3Bucket",
BucketName=s3_bucket("confidential", Ref(ENV)),
NotificationConfiguration=NotificationConfiguration(
LambdaConfigurations=[
LambdaConfigurations(
Event="s3:ObjectCreated:*",
Filter=Filter(
S3Key=S3Key(
Rules=[Rules(Name="prefix", Value=Ref(inputKeyPrefix)),
Rules(Name="suffix", Value=".json")]
)
),
Function=Ref(cost_function)
)
]
)
)
Est-il possible d'ajouter la configuration de notification à un compartiment existant?