Skip to content

Commit

Permalink
modify integ.sns.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jun1-t committed Mar 31, 2024
1 parent df48fd7 commit 3476666
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 41 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
}
],
"Version": "2012-10-17"
}
},
"PendingWindowInDays": 7
},
"UpdateReplacePolicy": "Retain",
"DeletionPolicy": "Retain"
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"MyTopic86869434": {
"Type": "AWS::SNS::Topic",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { Key } from 'aws-cdk-lib/aws-kms';
import { App, Stack, StackProps } from 'aws-cdk-lib';
import { App, Stack, StackProps, RemovalPolicy, Duration } from 'aws-cdk-lib';
import { LoggingProtocol, Topic } from 'aws-cdk-lib/aws-sns';
import { ManagedPolicy, PolicyDocument, PolicyStatement, Role, ServicePrincipal } from 'aws-cdk-lib/aws-iam';

class SNSInteg extends Stack {
constructor(scope: App, id: string, props?: StackProps) {
super(scope, id, props);

const key = new Key(this, 'CustomKey');
const key = new Key(this, 'CustomKey', {
pendingWindow: Duration.days(7),
removalPolicy: RemovalPolicy.DESTROY,
});

const topic = new Topic(this, 'MyTopic', {
topicName: 'fooTopic',
Expand Down

0 comments on commit 3476666

Please sign in to comment.