This simple script retrieves a secret of your choice from SecretsManager using the Lambda's provided event. Simply provide the payload:
{
"secret":"<identifier>"
}
where identifier is either the ID of the secret or the ARN of it.
| # Get all bitbucket repositories within an organisation and clone them in parallel | |
| # | |
| # Quick run: | |
| # docker run -it --rm -v "${PWD}:/src" -v "C:\Projects\:/repos" --env-file .env -w /src python:3.11 bash -c "pip install requests && python ./repo-downloader-bitbucket.py" | |
| # | |
| # 1. Set up an app password on your BitBucket account. Only repo read permissions are necessary. | |
| # 2. Setup your .env file or provide the environment variables listed below. The contents of the .env file are listed below: | |
| # # If you are using the default docker command above, /repos will work | |
| # #PROJECT_ROOT=/repos | |
| # PROJECT_ROOT= |
| #Install Github CLI | |
| # Set the scopes used for the token | |
| gh auth login -s read:packages,write:packages,delete:packages | |
| # Read the token in and use it in the docker login call | |
| gh auth token | docker login ghcr.io -u username --password-stdin |
| # Delete ECR Docker image in batch | |
| # Supports multiple regions if necessary | |
| $repositories = @( | |
| "image:tag" | |
| #... | |
| ); | |
| # Checked to verify which tags are present in a given region | |
| $primaryRegion = "eu-west-2" | |
| # Regions the image should be deleted from |
| --- | |
| apiVersion: secrets-store.csi.x-k8s.io/v1alpha1 | |
| kind: SecretProviderClass | |
| metadata: | |
| name: example-secret-provider | |
| namespace: secrets-csi-test | |
| spec: | |
| provider: aws | |
| secretObjects: | |
| # Each distinct secretObject creates a Secret which can be used within the namespace. Note that any pod able to access |
| output "variable" { | |
| value = var.extra_secrets_maps | |
| } | |
| output "variable_secrets" { | |
| value = [for m in var.extra_secrets_maps: m.secrets] | |
| } | |
| output "variable_serviceaccounts" { | |
| value = [for m in var.extra_secrets_maps: m.namespace_serviceaccounts] |
| param( | |
| [Parameter(Mandatory = $true)] | |
| [string] | |
| $InFile, | |
| [Parameter(Mandatory = $true)] | |
| [string] | |
| $OutDir | |
| ) | |
| $input = Get-Content $InFile -Delimiter "---" |
| param ( | |
| [switch] | |
| $Overwrite = $false, | |
| # If DockerServer is null, script performs the operation on all servers in the registry credential | |
| [string] | |
| $DockerServer = $null, | |
| [string] | |
| $SecretName = "regcred", |
This simple script retrieves a secret of your choice from SecretsManager using the Lambda's provided event. Simply provide the payload:
{
"secret":"<identifier>"
}
where identifier is either the ID of the secret or the ARN of it.
Send payload:
{
"request": "<url>"
}
The lambda will request the address and return the output in it's logs.
| $payload = @{ | |
| Id = "test" | |
| MetricStat = @{ | |
| Metric = @{ | |
| Namespace = "EC2Extended" | |
| MetricName = "RootFreeSpace" | |
| Dimensions = [System.Array] @( | |
| @{ | |
| Name = "path" | |
| Value = "/" |