S3 – Mounting in Linux

In order to mount an S3 Bucket as a file system, you need to install s3fs Create a directory to mount:   And add the following to "/etc/fstab":   Where: "artem-service-bucket:/upload/" – S3 bucket name and the directory inside the bucket to mount "url=https://s3.eu-central-1.amazonaws.com,endpoint=eu-central-1" – the region where the S3 bucket is located "iam_role" – … Continue reading " S3 – Mounting in Linux"

 Terraform – AWS SSM: Extract content

The SSM Parameter Store contains the following JSON:   It is necessary to extract the login and password, and use their values in the Terraform code. To do this, you can use the following construction:   And use variables:    

 Jenkins – Active Choice: S3 – Return necessary key value from JSON file

For a parameterized assembly with an image tag selection, you will need the Active Choices plugin Go to "Manage Jenkins"   Section "Manage Plugins"   Go to the "Available" tab and select "Active Choices" in the search. Install it.   Create a "New Item" – "Pipeline", indicate that it will be a parameterized assembly, and … Continue reading " Jenkins – Active Choice: S3 – Return necessary key value from JSON file"

 Python – AWS S3 keep N latest artifacts

This script gets a list of all directories in the bucket and deletes all objects in each directory, except for the last "N" specified. To run the script, you need to pass two arguments: Bucket name Number of last stored objects How to use it:   main.py: