See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| # 1. Create IAM Policy | |
| self.efs_csi_policy = iam.Policy( | |
| self, | |
| "EfsCsiPolicy", | |
| statements=[ | |
| iam.PolicyStatement( | |
| actions=[ | |
| "elasticfilesystem:DescribeAccessPoints", | |
| "elasticfilesystem:DescribeFileSystems" | |
| ], |
| # Import our logging package | |
| import logging | |
| # Set our default Logging Level to WARNING and override if an environment variable exists. The second argument in environ.get will set the EV if not set already. It is the default value. | |
| LOGLEVEL=os.environ.get('LOGLEVEL', 'WARNING').upper() | |
| logging.basicConfig(level=LOGLEVEL) | |
| # Print some logging information to the DEBUG loglevel. | |
| logging.debug("What I learned in boating school is") |
| Notes from: https://ben11kehoe.medium.com/boto3-sessions-and-why-you-should-use-them-9b094eb5ca8e | |
| API Session != normal ideas of "session" | |
| * API Sessions is a set of region + credentials, at base. If you're using a different region, or different credentials, you should be using a different session within Boto | |
| The configuration chain is listed here in the docs: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html |
| aws iam list-virtual-mfa-devices | grep UserName | sort | cut -f 2 -d: |
EKS Specific - For multi-AZ deployment, storage should be handled through EFS Dynamic Provisioning, using the EFS CSI driver. Only EFS can be used, as EBS volumes cannot be attached to multiple nodes.
| aws iam list-roles --query "Roles[?contains(RoleName,'Admin')]" |
For future reference:
Fn:ImportValue - I tend to have a ton of exports for several stacks, because each Fn:GettAtt needs to be its own export. Since Stack Layering is preferred over Nested Stacks, there are a ton of exports with each Template.AWS::IAM::ManagedPolicy - this is in contrast to AWS::IAM::Policy, which is actually used to define an in-line policy. Before reading more about, I was thinking that ManagedPolicy referred to the AWS-managed ones, but that's not the case.| import uuid | |
| def generate_name(name): | |
| while True: | |
| yield name + "-" + str(uuid.uuid4()) | |
| response = generate_name("test") | |
| print(next(response)) |
| --- | |
| - name: bootstrap | |
| hosts: localhost | |
| connection: local | |
| tasks: | |
| - name: Update System | |
| yum: | |
| name: "*" | |
| state: latest | |
| - name: Install tools |