Skip to content

Commit

Permalink
configure encryption for new queues
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbjacobson committed Mar 11, 2024
1 parent 479d4f8 commit 300596e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cdk/lib/feast-mobile-purchases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import type { App } from "aws-cdk-lib";
import {Duration} from "aws-cdk-lib";
import {Runtime} from "aws-cdk-lib/aws-lambda";
import {Queue, QueueEncryption} from "aws-cdk-lib/aws-sqs";
import {Alias, Key} from 'aws-cdk-lib/aws-kms'

Check failure on line 8 in cdk/lib/feast-mobile-purchases.ts

View workflow job for this annotation

GitHub Actions / CI

`aws-cdk-lib/aws-kms` import should occur before import of `aws-cdk-lib/aws-lambda`

export class FeastMobilePurchases extends GuStack {
constructor(scope: App, id: string, props: GuStackProps) {
Expand Down Expand Up @@ -48,14 +49,19 @@ export class FeastMobilePurchases extends GuStack {


// Queues
const key = new Key(this, 'Key')
const alias = new Alias(this, 'Alias', { aliasName: 'alias/sqs', targetKey: key })

const feastAppleSubscriptionsDeadLetterQueue = new Queue(this, "feast-apple-subscriptions-to-fetch-dlq", {
queueName: `${app}-${this.stage}-feast-apple-subscriptions-to-fetch-dlq`,
encryption: QueueEncryption.KMS,
encryptionMasterKey: alias,
})

new Queue(this, "feast-apple-subscriptions-to-fetch", {
queueName: `${app}-${this.stage}-feast-apple-subscriptions-to-fetch`,
encryption: QueueEncryption.KMS,
encryptionMasterKey: alias,
deadLetterQueue: {
queue: feastAppleSubscriptionsDeadLetterQueue,
maxReceiveCount: 8
Expand Down

0 comments on commit 300596e

Please sign in to comment.