User Tools

Site Tools


aws:aws-cloudformation_refs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

aws:aws-cloudformation_refs [15/02/2024 10:13] – created - external edit 127.0.0.1aws:aws-cloudformation_refs [30/05/2025 09:43] (current) – removed andrew
Line 1: Line 1:
-====== Create a ec2 instance and security group tied together with ''!Ref'' and an s3 bucket. ====== 
- 
-<code yaml> 
-Resources: 
-  Ec2Instance: 
-    Type: AWS::EC2::Instance 
-    Properties: 
-      InstanceType: t2.micro 
-      ImageId: ami-07d9160fa81ccffb5 # Amazon Linux AMI in Ireland 
-      Tags: 
-        - Key: Name 
-          Value: AJS -  simple EC2 example 
-        - Key: email 
-          Value: myname@company.co.uk 
-        - Key: BuiltBy 
-          Value: CloudFormation 
-        - Key: JoinTest 
-          Value: !Join [ ":", [ Join, Example, in, YAML ] ] 
-      SecurityGroups: 
-        - !Ref SecurityGroupSSH 
- 
-  SecurityGroupSSH: 
-    Type: AWS::EC2::SecurityGroup 
-    Properties: 
-      GroupDescription: Allow SSH 
-      SecurityGroupIngress: 
-        - IpProtocol: tcp 
-          FromPort: '22' 
-          ToPort: '22' 
-          CidrIp: 0.0.0.0/0 
-      Tags: 
-        - Key: Name 
-          Value: AJS - Allow SSH 
- 
-  S3BucketExample: 
-    Type: AWS::S3::Bucket 
-    Properties: 
-      AccessControl: PublicRead 
-      BucketName: ajs-bucket 
-      WebsiteConfiguration: 
-        IndexDocument: index.html 
-      Tags: 
-        - Key: Name 
-          Value: AJSTestBucket 
-        - Key: builtby 
-          Value: CloudFormation 
-</code> 
- 
- 
  
aws/aws-cloudformation_refs.1707991990.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki