This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ansible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AWS Security |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vagrant init generic/ubuntu2204 | |
| vagrant up | |
| vagrant ssh | |
| cat /etc/os-release | |
| uname -a | |
| sudo apt install net-tools | |
| ifconfig | |
| pstree | |
| service ssh status OR systemctl status ssh | |
| exit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AWSTemplateFormatVersion: "2010-09-09" | |
| Transform: AWS::Serverless-2016-10-31 | |
| Description: SAM Template for serverless WebSocket chat example | |
| # More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst | |
| Globals: | |
| Function: | |
| Timeout: 3 | |
| CodeUri: websocket_demo/ | |
| MemorySize: 1024 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AWSTemplateFormatVersion: 2010-09-09 | |
| Parameters: | |
| BucketPrefix: | |
| Type: String | |
| Default: video-storage | |
| FromEmail: | |
| Type: String | |
| ToEmail: | |
| Type: String | |
| Resources: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| lambdaInvokePermissions: | |
| Type: AWS::Lambda::Permission | |
| Properties: | |
| FunctionName: !GetAtt LambdaFunction.Arn | |
| Action: lambda:InvokeFunction | |
| Principal: events.amazonaws.com | |
| SourceArn: !GetAtt LambdaFunctionSchedule.Arn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - 'events:PutTargets' | |
| - 'events:RemoveTargets' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| trigger_rule_name = os.environ['EventTriggerRuleName'] | |
| eventsbridge_client = boto3.client('events') | |
| if event['RequestType'] == 'Create': | |
| ... | |
| try: | |
| eventsbridge_client.put_targets(Rule=trigger_rule_name, | |
| Targets=[{ | |
| 'Arn': context.invoked_function_arn, | |
| 'Id': 'FIS-Experiment-Lambda-trigger', | |
| }]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LambdaFunction: | |
| Type: 'AWS::Lambda::Function' | |
| Properties: | |
| Environment: | |
| Variables: | |
| FISExperimentId: | |
| 'Fn::GetAtt': | |
| - 'CHAOSSIM' | |
| - Id | |
| EventTriggerRuleName: !Ref LambdaFunctionSchedule |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if event.get('RequestType') != None: | |
| if event['RequestType'] == 'Create': | |
| ... | |
| if event['RequestType'] == 'Update': | |
| ... | |
| if event['RequestType'] == 'Delete': | |
| ... | |
| else: | |
| ... |
NewerOlder