forked from nspacer/aws-codepipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresource_stack.py
More file actions
28 lines (25 loc) · 1.17 KB
/
Copy pathresource_stack.py
File metadata and controls
28 lines (25 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from aws_cdk import (
Stack,
aws_sqs as sqs,
Duration,
aws_lambda as function_lambda,
aws_s3 as s3
)
from constructs import Construct
class ResourceStack(Stack):
def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None:
super().__init__(scope, construct_id, **kwargs)
queue = sqs.Queue(
self, "AWSCDKCodePipelineappDemoQueue",
visibility_timeout=Duration.seconds(300),
queue_name="demo_queue"
)
function = function_lambda.Function(self,
"DemoCDKGITHUBLambda",
function_name="codepipeline_lambda",
runtime=function_lambda.Runtime.PYTHON_3_9,
code=function_lambda.Code.from_asset('./lambda_code_demo'),
handler="demo_lambda.lambda_handler")
bucket = s3.Bucket(self, "MyfirstBucket", versioned=True,
bucket_name="demo-bucket-beyond-the-cloud-98979867",
block_public_access=s3.BlockPublicAccess.BLOCK_ALL)