@@ -2,16 +2,16 @@ import * as pulumi from "@pulumi/pulumi";
2
2
import * as aws from "@pulumi/aws" ;
3
3
4
4
// Athena
5
- const databaseBucket = new aws . s3 . Bucket ( "mydatabasebucket" ) ;
6
- const database = new aws . athena . Database ( "mydatabase" , {
7
- name : "mydatabase" ,
8
- bucket : databaseBucket . bucket
9
- } ) ;
5
+ // const databaseBucket = new aws.s3.Bucket("mydatabasebucket");
6
+ // const database = new aws.athena.Database("mydatabase", {
7
+ // name: "mydatabase",
8
+ // bucket: databaseBucket.bucket
9
+ // });
10
10
11
- const namedQuery = new aws . athena . NamedQuery ( "mynamedquery" , {
12
- database : database . id ,
13
- query : pulumi . interpolate `SELECT * FROM ${ database . id } limit 10;` ,
14
- } ) ;
11
+ // const namedQuery = new aws.athena.NamedQuery("mynamedquery", {
12
+ // database: database.id,
13
+ // query: pulumi.interpolate `SELECT * FROM ${database.id} limit 10;`,
14
+ // });
15
15
16
16
// CloudWatch
17
17
const dashboard = new aws . cloudwatch . Dashboard ( "mydashboard" , {
@@ -235,54 +235,54 @@ const user = new aws.iam.User("myuser");
235
235
236
236
const group = new aws . iam . Group ( "mygroup" ) ;
237
237
238
- const policyAttachment = new aws . iam . PolicyAttachment ( "mypolicyattachment" , {
239
- users : [ user ] ,
240
- groups : [ group ] ,
241
- roles : [ role ] ,
242
- policyArn : policy . arn
243
- } ) ;
238
+ // const policyAttachment = new aws.iam.PolicyAttachment("mypolicyattachment", {
239
+ // users: [user],
240
+ // groups: [group],
241
+ // roles: [role],
242
+ // policyArn: policy.arn
243
+ // });
244
244
245
245
// Kinesis
246
246
const stream = new aws . kinesis . Stream ( "mystream" , {
247
247
shardCount : 1
248
248
} ) ;
249
249
250
250
// S3
251
- const bucket = new aws . s3 . Bucket ( "my-bucket" ) ;
252
-
253
- const bucketMetric = new aws . s3 . BucketMetric ( "my-bucket-metric" , {
254
- bucket : bucket . bucket
255
- } ) ;
256
-
257
- const bucketNotification = new aws . s3 . BucketNotification ( "my-bucket-notification" , {
258
- bucket : bucket . bucket
259
- } ) ;
260
-
261
- const bucketObject = new aws . s3 . BucketObject ( "my-bucket-object" , {
262
- bucket : bucket . bucket ,
263
- content : "hello world"
264
- } ) ;
265
-
266
- const bucketPolicy = new aws . s3 . BucketPolicy ( "my-bucket-policy" , {
267
- bucket : bucket . bucket ,
268
- policy : bucket . bucket . apply ( publicReadPolicyForBucket )
269
- } )
270
-
271
- function publicReadPolicyForBucket ( bucketName : string ) {
272
- return JSON . stringify ( {
273
- Version : "2012-10-17" ,
274
- Statement : [ {
275
- Effect : "Allow" ,
276
- Principal : "*" ,
277
- Action : [
278
- "s3:GetObject"
279
- ] ,
280
- Resource : [
281
- `arn:aws:s3:::${ bucketName } /*` // policy refers to bucket name explicitly
282
- ]
283
- } ]
284
- } ) ;
285
- }
251
+ // const bucket = new aws.s3.Bucket("my-bucket");
252
+
253
+ // const bucketMetric = new aws.s3.BucketMetric("my-bucket-metric", {
254
+ // bucket: bucket.bucket
255
+ // });
256
+
257
+ // const bucketNotification = new aws.s3.BucketNotification("my-bucket-notification", {
258
+ // bucket: bucket.bucket
259
+ // });
260
+
261
+ // const bucketObject = new aws.s3.BucketObject("my-bucket-object", {
262
+ // bucket: bucket.bucket,
263
+ // content: "hello world"
264
+ // });
265
+
266
+ // const bucketPolicy = new aws.s3.BucketPolicy("my-bucket-policy", {
267
+ // bucket: bucket.bucket,
268
+ // policy: bucket.bucket.apply(publicReadPolicyForBucket)
269
+ // })
270
+
271
+ // function publicReadPolicyForBucket(bucketName: string) {
272
+ // return JSON.stringify({
273
+ // Version: "2012-10-17",
274
+ // Statement: [{
275
+ // Effect: "Allow",
276
+ // Principal: "*",
277
+ // Action: [
278
+ // "s3:GetObject"
279
+ // ],
280
+ // Resource: [
281
+ // `arn:aws:s3:::${bucketName}/*` // policy refers to bucket name explicitly
282
+ // ]
283
+ // }]
284
+ // });
285
+ // }
286
286
287
287
// SQS
288
288
const queue = new aws . sqs . Queue ( "myqueue" ) ;
0 commit comments