diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 27e4de56157a..b7721b70dc6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,12 @@ name: TestNDeploy -on: [push, pull_request] +on: + push: + paths-ignore: + - 'README.md' + branches: + - localstack + pull_request: jobs: cache: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000000..730491a89fd7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,195 @@ +# LocalStack specific workflow to implement a fully-integrated continuous integration pipeline for our fork +# - Rebase this fork based on the latest commit on `main` of upstream +# - Build a Python source and wheel distribution of moto-ext with deterministic versioning +# - Publish the distributions to PyPi +# - Tag the commit in this fork with the new version +# - Create a GitHub release for the new version + +name: Sync / Release moto-ext + +on: + schedule: + - cron: 0 5 * * MON + workflow_dispatch: + inputs: + dry_run: + description: 'Dry Run?' + default: true + required: true + type: boolean + +# limit concurrency to 1 +concurrency: + group: ${{ github.workflow }} + +jobs: + sync-build-release-moto-ext: + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/project/moto-ext/ + permissions: + contents: write + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: localstack + persist-credentials: false + + - name: Setup Python + uses: actions/setup-python@v6 + with: + python-version: '3.13' + + - name: Configure Git + run: | + # Configure git + git config --global user.name 'LocalStack Bot' + git config --global user.email 'localstack-bot@users.noreply.github.com' + git remote set-url origin https://git:${{ secrets.PRO_ACCESS_TOKEN }}@github.com/${{ github.repository }} + + # make sure to switch to the `localstack` branch (default / main branch of this fork) + git switch localstack + # add moto upstream as remote + git remote add upstream https://github.com/getmoto/moto.git + # rebase with latest changes + git pull + + # Create a custom merge driver which prefers everything from upstream _BUT_ the name and the URL + mkdir -p $HOME/.local/bin + cat > $HOME/.local/bin/git-prefer-theirs-name-url << EOF + #!/bin/bash + set -e + + base="\$1" + local="\$2" + remote="\$3" + + echo "Executing custom merge driver for base \$base, local \$local, remote \$remote." + + # Define keys to keep + KEYS=("name" "url") + + # Read files into arrays + mapfile -t REMOTE_LINES < "\$remote" + mapfile -t LOCAL_LINES < "\$local" + + echo "merging \$local + \$local + \$remote ..." + + # Function to check if a line should be kept (matches any key) + keep_line() { + local line="\$1" + for key in "\${KEYS[@]}"; do + [[ "\$line" == *"\$key"* ]] && return 0 + done + return 1 + } + + # keep key-matched lines from local, others from remote + for i in "\${!LOCAL_LINES[@]}"; do + if keep_line "\${REMOTE_LINES[i]}"; then + echo "\${REMOTE_LINES[i]}" + else + echo "\${LOCAL_LINES[i]}" + fi + done > "\$local" + + exit 0 + EOF + + # make the script executable and add it to the PATH + chmod +x $HOME/.local/bin/git-prefer-theirs-name-url + echo "$HOME/.local/bin" >> "$GITHUB_PATH" + + # add the merge driver to the git config + cat >> .git/config << EOF + + [merge "git-prefer-theirs-name-url"] + name = A driver which resolves merge conflicts on a setup.cfg such that it always takes the local name and url, and everything else from upstream + driver = git-prefer-theirs-name-url %O %A %B + EOF + + # define to use the custom merge driver for the setup.cfg + cat > .gitattributes << EOF + setup.cfg merge=git-prefer-theirs-name-url + EOF + + - name: Rebase localstack branch with latest master from upstream + run: | + git fetch upstream + git rebase -f upstream/master + + - name: Determine new version + run: | + echo "Determining new version..." + cat > setuptools.cfg << EOF + [tool.setuptools_scm] + local_scheme = "no-local-version" + version_scheme = "post-release" + EOF + python3 -m venv .venv + source .venv/bin/activate + python3 -m pip install setuptools_scm + NEW_VERSION=$(python3 -m setuptools_scm -c setuptools.cfg) + NEW_VERSION="${NEW_VERSION//dev/post}" + echo "New version is: $NEW_VERSION" + echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV + + - name: Build Python distributions + # FYI: Checks in this script only work because the -e flag is enabled by default in GitHub actions + run: | + python3 -m pip install build + + echo "Setting new version in setup.cfg": + # make sure setup.cfg is not dirty yet + git diff --exit-code setup.cfg + sed -i -E 's/^(version\s*=\s*)("?)[^"]+("?)/\1\2'"$NEW_VERSION"'\3/' setup.cfg + # make sure setup.cfg is dirty now + ! git diff --exit-code setup.cfg + + echo "Building new version and tagging commit..." + python3 -m build + + - name: Tag successful build + run: | + git tag -a $NEW_VERSION -m $NEW_VERSION + + - name: Clean up + run: | + git reset --hard + git clean -df + + - name: Store built distributions + uses: actions/upload-artifact@v4 + with: + name: moto-ext-dists + path: dist/*.* + + # publish the package before pushing the tag (this might fail if the version already exists on PyPI) + - name: Publish package distributions to PyPI + if: ${{ github.event.inputs.dry_run != 'true' }} + uses: pypa/gh-action-pypi-publish@release/v1 + + - name: Push + if: ${{ github.event.inputs.dry_run != 'true' }} + run: | + git push --force-with-lease + git push --atomic origin localstack $NEW_VERSION + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # Add a retry to avoid issues where the GH CLI fails + # because it does not yet detect the pushed tag. + - name: Create Release + uses: nick-fields/retry@v3 + if: ${{ github.event.inputs.dry_run != 'true' }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + max_attempts: 5 + retry_wait_seconds: 120 + timeout_minutes: 5 + command: gh release create $NEW_VERSION --repo localstack/moto --notes "automatic rebase sync and release" \ No newline at end of file diff --git a/.github/workflows/data-update_config-managed-rules.yml b/.github/workflows/data-update_config-managed-rules.yml index 9d6d115d56fe..55338d18d507 100644 --- a/.github/workflows/data-update_config-managed-rules.yml +++ b/.github/workflows/data-update_config-managed-rules.yml @@ -16,7 +16,7 @@ jobs: update: name: Update Config Managed Rules runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' && github.repository == 'getmoto/moto' }} + if: ${{ github.ref == 'refs/heads/localstack' && github.repository == 'localstack/moto' }} permissions: id-token: write contents: write diff --git a/.github/workflows/data-update_ec2-instance-offerings.yml b/.github/workflows/data-update_ec2-instance-offerings.yml index c3922c3ff00f..db11141a95ff 100644 --- a/.github/workflows/data-update_ec2-instance-offerings.yml +++ b/.github/workflows/data-update_ec2-instance-offerings.yml @@ -16,7 +16,7 @@ jobs: update: name: Update EC2 Instance Offerings runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' && github.repository == 'getmoto/moto' }} + if: ${{ github.ref == 'refs/heads/localstack' && github.repository == 'localstack/moto' }} permissions: id-token: write contents: write @@ -35,7 +35,7 @@ jobs: uses: aws-actions/configure-aws-credentials@v5 with: aws-region: us-east-1 - role-to-assume: arn:aws:iam::682283128318:role/GithubActionsRole + role-to-assume: arn:aws:iam::385386232812:role/MotoExt-OIDC-Role - name: Pull EC2 instance types from AWS run: | diff --git a/.github/workflows/data-update_ec2-instance-types.yml b/.github/workflows/data-update_ec2-instance-types.yml index 27a47f7f179f..b519b615cd9f 100644 --- a/.github/workflows/data-update_ec2-instance-types.yml +++ b/.github/workflows/data-update_ec2-instance-types.yml @@ -16,7 +16,7 @@ jobs: update: name: Update EC2 Instance Types runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' && github.repository == 'getmoto/moto' }} + if: ${{ github.ref == 'refs/heads/localstack' && github.repository == 'localstack/moto' }} permissions: id-token: write contents: write @@ -35,7 +35,7 @@ jobs: uses: aws-actions/configure-aws-credentials@v5 with: aws-region: us-east-1 - role-to-assume: arn:aws:iam::682283128318:role/GithubActionsRole + role-to-assume: arn:aws:iam::385386232812:role/MotoExt-OIDC-Role - name: Pull EC2 instance types from AWS run: | diff --git a/.github/workflows/data-update_emr_instance_types.yml b/.github/workflows/data-update_emr_instance_types.yml index 099f39cf727b..f48ddab06ab6 100644 --- a/.github/workflows/data-update_emr_instance_types.yml +++ b/.github/workflows/data-update_emr_instance_types.yml @@ -16,7 +16,7 @@ jobs: update: name: Update EMR Instance Types runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' && github.repository == 'getmoto/moto' }} + if: ${{ github.ref == 'refs/heads/localstack' && github.repository == 'localstack/moto' }} permissions: id-token: write contents: write @@ -35,7 +35,7 @@ jobs: uses: aws-actions/configure-aws-credentials@v5 with: aws-region: us-east-1 - role-to-assume: arn:aws:iam::682283128318:role/GithubActionsRole + role-to-assume: arn:aws:iam::385386232812:role/MotoExt-OIDC-Role - name: Pull EMR instance types from AWS run: | diff --git a/.github/workflows/data-update_iam-managed-policies.yml b/.github/workflows/data-update_iam-managed-policies.yml index 10d2dab62850..3f699d69d41f 100644 --- a/.github/workflows/data-update_iam-managed-policies.yml +++ b/.github/workflows/data-update_iam-managed-policies.yml @@ -16,7 +16,7 @@ jobs: update: name: Update IAM Managed Policies runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' && github.repository == 'getmoto/moto' }} + if: ${{ github.ref == 'refs/heads/localstack' && github.repository == 'localstack/moto' }} permissions: id-token: write contents: write @@ -35,7 +35,7 @@ jobs: uses: aws-actions/configure-aws-credentials@v5 with: aws-region: us-east-1 - role-to-assume: arn:aws:iam::682283128318:role/GithubActionsRole + role-to-assume: arn:aws:iam::385386232812:role/MotoExt-OIDC-Role - name: Pull IAM managed policies from AWS run: | diff --git a/.github/workflows/data-update_ssm-default-amis.yml b/.github/workflows/data-update_ssm-default-amis.yml index 5e10c4f99f20..a34cd19077ef 100644 --- a/.github/workflows/data-update_ssm-default-amis.yml +++ b/.github/workflows/data-update_ssm-default-amis.yml @@ -16,7 +16,7 @@ jobs: update: name: Update SSM default AMIs runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' && github.repository == 'getmoto/moto' }} + if: ${{ github.ref == 'refs/heads/localstack' && github.repository == 'localstack/moto' }} permissions: id-token: write contents: write @@ -35,7 +35,7 @@ jobs: uses: aws-actions/configure-aws-credentials@v5 with: aws-region: us-east-1 - role-to-assume: arn:aws:iam::682283128318:role/GithubActionsRole + role-to-assume: arn:aws:iam::385386232812:role/MotoExt-OIDC-Role - name: Pull SSM default AMIs from AWS run: | diff --git a/.github/workflows/data-update_ssm-default-parameters.yml b/.github/workflows/data-update_ssm-default-parameters.yml index ca8a375662e2..c68f886c5068 100644 --- a/.github/workflows/data-update_ssm-default-parameters.yml +++ b/.github/workflows/data-update_ssm-default-parameters.yml @@ -16,7 +16,7 @@ jobs: update: name: Update SSM default parameters runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' && github.repository == 'getmoto/moto' }} + if: ${{ github.ref == 'refs/heads/localstack' && github.repository == 'localstack/moto' }} permissions: id-token: write contents: write @@ -35,7 +35,7 @@ jobs: uses: aws-actions/configure-aws-credentials@v5 with: aws-region: us-east-1 - role-to-assume: arn:aws:iam::682283128318:role/GithubActionsRole + role-to-assume: arn:aws:iam::385386232812:role/MotoExt-OIDC-Role - name: Pull SSM default Parameters from AWS run: | diff --git a/.github/workflows/data-update_ssm-optimized-amis.yml b/.github/workflows/data-update_ssm-optimized-amis.yml index e04fc12412ee..c759b49c026a 100644 --- a/.github/workflows/data-update_ssm-optimized-amis.yml +++ b/.github/workflows/data-update_ssm-optimized-amis.yml @@ -16,7 +16,7 @@ jobs: update: name: Update SSM Optimized AMIs runs-on: ubuntu-latest - if: ${{ github.ref == 'refs/heads/master' && github.repository == 'getmoto/moto' }} + if: ${{ github.ref == 'refs/heads/localstack' && github.repository == 'localstack/moto' }} permissions: id-token: write contents: write @@ -35,7 +35,7 @@ jobs: uses: aws-actions/configure-aws-credentials@v5 with: aws-region: us-east-1 - role-to-assume: arn:aws:iam::682283128318:role/GithubActionsRole + role-to-assume: arn:aws:iam::385386232812:role/MotoExt-OIDC-Role - name: Pull SSM Optimized AMIs from AWS run: | diff --git a/.github/workflows/dockertests.yml b/.github/workflows/dockertests.yml index 94ffb9ea0982..af70bcdc9613 100644 --- a/.github/workflows/dockertests.yml +++ b/.github/workflows/dockertests.yml @@ -1,6 +1,12 @@ name: DockerTests -on: [push, pull_request] +on: + push: + paths-ignore: + - 'README.md' + branches: + - localstack + pull_request: jobs: cache: diff --git a/Makefile b/Makefile index 299fac705636..41868ba87850 100644 --- a/Makefile +++ b/Makefile @@ -41,6 +41,16 @@ test-only: test: lint test-only +terraformtests: + @echo "Make sure that the MotoServer is already running on port 4566 (moto_server -p 4566)" + @echo "USAGE: make terraformtests SERVICE_NAME=acm TEST_NAMES=TestAccACMCertificate" + @echo "" + cd tests/terraformtests && bin/run_go_test $(SERVICE_NAME) "$(TEST_NAMES)" + +publish: + python -m build + twine upload dist/* + test_server: @TEST_SERVER_MODE=true pytest -sv --cov=moto --cov-report xml ./tests/ diff --git a/README.md b/README.md index d28e681600a3..13db57a7863a 100644 --- a/README.md +++ b/README.md @@ -1,86 +1,3 @@ -# Moto - Mock AWS Services +# moto-ext -[![Join the chat at https://gitter.im/awsmoto/Lobby](https://badges.gitter.im/awsmoto/Lobby.svg)](https://gitter.im/awsmoto/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - -[![Build Status](https://github.com/getmoto/moto/workflows/TestNDeploy/badge.svg)](https://github.com/getmoto/moto/actions) -[![Coverage Status](https://codecov.io/gh/getmoto/moto/branch/master/graph/badge.svg)](https://codecov.io/gh/getmoto/moto) -[![Docs](https://readthedocs.org/projects/pip/badge/?version=stable)](http://docs.getmoto.org) -[![PyPI](https://img.shields.io/pypi/v/moto.svg)](https://pypi.org/project/moto/) -[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/moto.svg)](#) -[![PyPI - Downloads](https://img.shields.io/pypi/dw/moto.svg)](https://pypistats.org/packages/moto) -[![Code style: Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) -[![Financial Contributors](https://opencollective.com/moto/tiers/badge.svg)](https://opencollective.com/moto) - - -## Install - -```console -$ pip install 'moto[ec2,s3,all]' -``` - -## In a nutshell - - -Moto is a library that allows your tests to easily mock out AWS Services. - -Imagine you have the following python code that you want to test: - -```python -import boto3 - - -class MyModel: - def __init__(self, name, value): - self.name = name - self.value = value - - def save(self): - s3 = boto3.client("s3", region_name="us-east-1") - s3.put_object(Bucket="mybucket", Key=self.name, Body=self.value) -``` - -Take a minute to think how you would have tested that in the past. - -Now see how you could test it with Moto: - -```python -import boto3 -from moto import mock_aws -from mymodule import MyModel - - -@mock_aws -def test_my_model_save(): - conn = boto3.resource("s3", region_name="us-east-1") - # We need to create the bucket since this is all in Moto's 'virtual' AWS account - conn.create_bucket(Bucket="mybucket") - model_instance = MyModel("steve", "is awesome") - model_instance.save() - body = conn.Object("mybucket", "steve").get()["Body"].read().decode("utf-8") - assert body == "is awesome" -``` - -With the decorator wrapping the test, all the calls to s3 are automatically mocked out. The mock keeps track of the state of the buckets and keys. - -For a full list of which services and features are covered, please see our [implementation coverage](https://github.com/getmoto/moto/blob/master/IMPLEMENTATION_COVERAGE.md). - - -### Documentation -The full documentation can be found here: - -[http://docs.getmoto.org/en/latest/](http://docs.getmoto.org/en/latest/) - - -### Financial Contributions -Support this project and its continued development, by sponsoring us! - -Click the `Sponsor`-button at the top of the page for more information. - -Our finances are managed by OpenCollective, which means you have full visibility into all our contributions and expenses: -https://opencollective.com/moto - -### Security contact information - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. +Fork of [Moto](https://github.com/getmoto/moto) with patches and fixes for [LocalStack](https://github.com/localstack/localstack). diff --git a/moto/ssm/resources/ami-amazon-linux-latest/us-gov-east-1.json b/moto/ssm/resources/ami-amazon-linux-latest/us-gov-east-1.json new file mode 100644 index 000000000000..abf14dfcb2a8 --- /dev/null +++ b/moto/ssm/resources/ami-amazon-linux-latest/us-gov-east-1.json @@ -0,0 +1,191 @@ +[ + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-arm64", + "DataType": "text", + "LastModifiedDate": 1721692759.417, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-arm64", + "Type": "String", + "Value": "ami-0388cfad0bfbabb99", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-arm64", + "DataType": "text", + "LastModifiedDate": 1721692760.492, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-arm64", + "Type": "String", + "Value": "ami-045a9bf9ced62bc2f", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-6.1-x86_64", + "DataType": "text", + "LastModifiedDate": 1721692760.222, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-6.1-x86_64", + "Type": "String", + "Value": "ami-0dbef5e1adb6e1abf", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-arm64", + "DataType": "text", + "LastModifiedDate": 1721692760.983, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-arm64", + "Type": "String", + "Value": "ami-06cfed33cc8526f2d", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-hvm-x86_64-s3", + "DataType": "text", + "LastModifiedDate": 1703012167.998, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-hvm-x86_64-s3", + "Type": "String", + "Value": "ami-0a4c808d4c1a4bd8b", + "Version": 67 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2", + "DataType": "text", + "LastModifiedDate": 1721697389.518, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2", + "Type": "String", + "Value": "ami-0ad9a80ec3dceacee", + "Version": 85 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs", + "DataType": "text", + "LastModifiedDate": 1721697389.822, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs", + "Type": "String", + "Value": "ami-0aeefe7aca43006af", + "Version": 114 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-ebs", + "DataType": "text", + "LastModifiedDate": 1721697390.713, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-ebs", + "Type": "String", + "Value": "ami-0dbbc1ffd92e9dc3a", + "Version": 73 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-arm64-ebs", + "DataType": "text", + "LastModifiedDate": 1721697391.321, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-arm64-ebs", + "Type": "String", + "Value": "ami-0f679fed2d6731f5e", + "Version": 85 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-x86_64-ebs", + "DataType": "text", + "LastModifiedDate": 1721697391.614, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-x86_64-ebs", + "Type": "String", + "Value": "ami-00cedd6af9996d4d7", + "Version": 114 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-x86_64", + "DataType": "text", + "LastModifiedDate": 1721692759.694, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-x86_64", + "Type": "String", + "Value": "ami-0a5db8fbece0eb74b", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64", + "DataType": "text", + "LastModifiedDate": 1721692760.743, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64", + "Type": "String", + "Value": "ami-0de91fdcfc8d9f74e", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-6.1-arm64", + "DataType": "text", + "LastModifiedDate": 1721692759.96, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-6.1-arm64", + "Type": "String", + "Value": "ami-0cbbefdbb400bc3fa", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64", + "DataType": "text", + "LastModifiedDate": 1721692761.237, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64", + "Type": "String", + "Value": "ami-02225bbcc9e4f69ec", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-ebs", + "DataType": "text", + "LastModifiedDate": 1703012167.223, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-ebs", + "Type": "String", + "Value": "ami-0eabcdae6cabf6e70", + "Version": 67 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-s3", + "DataType": "text", + "LastModifiedDate": 1703012167.616, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-s3", + "Type": "String", + "Value": "ami-0654bf9da906daf8b", + "Version": 67 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-hvm-x86_64-ebs", + "DataType": "text", + "LastModifiedDate": 1703012167.808, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-hvm-x86_64-ebs", + "Type": "String", + "Value": "ami-0aea210be1a75b94e", + "Version": 67 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2", + "DataType": "text", + "LastModifiedDate": 1721697390.123, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2", + "Type": "String", + "Value": "ami-01abf14eabdf9aade", + "Version": 114 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-arm64-gp2", + "DataType": "text", + "LastModifiedDate": 1721697390.421, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-arm64-gp2", + "Type": "String", + "Value": "ami-0cf49cd7abf721d78", + "Version": 73 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-gp2", + "DataType": "text", + "LastModifiedDate": 1721697391.015, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-gp2", + "Type": "String", + "Value": "ami-0db1e2b6da3a4ef84", + "Version": 73 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-east-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2", + "DataType": "text", + "LastModifiedDate": 1703012167.428, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2", + "Type": "String", + "Value": "ami-0a80c906edacd0e8b", + "Version": 67 + } +] \ No newline at end of file diff --git a/moto/ssm/resources/ami-amazon-linux-latest/us-gov-west-1.json b/moto/ssm/resources/ami-amazon-linux-latest/us-gov-west-1.json new file mode 100644 index 000000000000..9508646e0ba7 --- /dev/null +++ b/moto/ssm/resources/ami-amazon-linux-latest/us-gov-west-1.json @@ -0,0 +1,227 @@ +[ + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-arm64", + "DataType": "text", + "LastModifiedDate": 1721692762.09, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-arm64", + "Type": "String", + "Value": "ami-011efb3cb2db23315", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-arm64", + "DataType": "text", + "LastModifiedDate": 1721692762.569, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-arm64", + "Type": "String", + "Value": "ami-019ee724f2be51720", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-6.1-x86_64", + "DataType": "text", + "LastModifiedDate": 1721692762.461, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-6.1-x86_64", + "Type": "String", + "Value": "ami-0c74a4baed89bc2c8", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-arm64", + "DataType": "text", + "LastModifiedDate": 1721692762.795, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-arm64", + "Type": "String", + "Value": "ami-01bdd33fcf8c3faaf", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-hvm-x86_64-s3", + "DataType": "text", + "LastModifiedDate": 1703012169.012, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-hvm-x86_64-s3", + "Type": "String", + "Value": "ami-0bb609de40cb15fb0", + "Version": 69 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-pv-x86_64-s3", + "DataType": "text", + "LastModifiedDate": 1703012169.337, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-pv-x86_64-s3", + "Type": "String", + "Value": "ami-0cdbe7f8dcc75fb7c", + "Version": 68 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2", + "DataType": "text", + "LastModifiedDate": 1721697392.494, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-arm64-gp2", + "Type": "String", + "Value": "ami-0fccef3543f16dd9b", + "Version": 85 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs", + "DataType": "text", + "LastModifiedDate": 1721697392.632, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-ebs", + "Type": "String", + "Value": "ami-0eea2ae1689e53bef", + "Version": 119 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-ebs", + "DataType": "text", + "LastModifiedDate": 1721697392.995, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-ebs", + "Type": "String", + "Value": "ami-06ba9aacc2eed0ff5", + "Version": 74 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-arm64-ebs", + "DataType": "text", + "LastModifiedDate": 1721697393.216, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-arm64-ebs", + "Type": "String", + "Value": "ami-0549b0e03a35cad47", + "Version": 85 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64", + "DataType": "text", + "LastModifiedDate": 1721692762.894, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-default-x86_64", + "Type": "String", + "Value": "ami-03e7ac6ecae00de4c", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-ebs", + "DataType": "text", + "LastModifiedDate": 1703012168.667, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-ebs", + "Type": "String", + "Value": "ami-034c73ffbb74bb99c", + "Version": 69 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-s3", + "DataType": "text", + "LastModifiedDate": 1703012168.841, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-s3", + "Type": "String", + "Value": "ami-08cdd8d24cc1709c7", + "Version": 69 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-hvm-x86_64-ebs", + "DataType": "text", + "LastModifiedDate": 1703012168.934, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-hvm-x86_64-ebs", + "Type": "String", + "Value": "ami-00eea1719b6aae09e", + "Version": 69 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-pv-x86_64-ebs", + "DataType": "text", + "LastModifiedDate": 1703012169.106, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-pv-x86_64-ebs", + "Type": "String", + "Value": "ami-0e3c8ed0bf77adcff", + "Version": 68 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-pv-x86_64-s3", + "DataType": "text", + "LastModifiedDate": 1703012169.187, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-minimal-pv-x86_64-s3", + "Type": "String", + "Value": "ami-07aeb19a8d919da02", + "Version": 68 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-pv-x86_64-ebs", + "DataType": "text", + "LastModifiedDate": 1703012169.262, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-pv-x86_64-ebs", + "Type": "String", + "Value": "ami-0eb0af607aabfafff", + "Version": 68 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-arm64-gp2", + "DataType": "text", + "LastModifiedDate": 1721697392.88, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-arm64-gp2", + "Type": "String", + "Value": "ami-0c2ed33fcbcc83ebe", + "Version": 74 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-gp2", + "DataType": "text", + "LastModifiedDate": 1721697393.114, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-kernel-5.10-hvm-x86_64-gp2", + "Type": "String", + "Value": "ami-0e7f6bd7808f3f95f", + "Version": 74 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-x86_64-ebs", + "DataType": "text", + "LastModifiedDate": 1721697393.321, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-minimal-hvm-x86_64-ebs", + "Type": "String", + "Value": "ami-05eb4d4349faed35c", + "Version": 119 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-x86_64", + "DataType": "text", + "LastModifiedDate": 1721692762.216, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-x86_64", + "Type": "String", + "Value": "ami-0813aacedccabaaad", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64", + "DataType": "text", + "LastModifiedDate": 1721692762.685, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64", + "Type": "String", + "Value": "ami-0f8c631fccd898fcc", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-6.1-arm64", + "DataType": "text", + "LastModifiedDate": 1721692762.348, + "Name": "/aws/service/ami-amazon-linux-latest/al2023-ami-minimal-kernel-6.1-arm64", + "Type": "String", + "Value": "ami-0b2a6da8cb6b500ff", + "Version": 50 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2", + "DataType": "text", + "LastModifiedDate": 1703012168.758, + "Name": "/aws/service/ami-amazon-linux-latest/amzn-ami-hvm-x86_64-gp2", + "Type": "String", + "Value": "ami-0cfb8ee4baf66e51e", + "Version": 69 + }, + { + "ARN": "arn:aws-us-gov:ssm:us-gov-west-1::parameter/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2", + "DataType": "text", + "LastModifiedDate": 1721697392.767, + "Name": "/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2", + "Type": "String", + "Value": "ami-03ebdb8bd059274a1", + "Version": 119 + } +] \ No newline at end of file diff --git a/moto/ssm/resources/regions.json b/moto/ssm/resources/regions.json index a580511ab0ec..eacb0d3f236a 100644 --- a/moto/ssm/resources/regions.json +++ b/moto/ssm/resources/regions.json @@ -7926,6 +7926,9 @@ "Value": "HTTPS" } }, + "bedrock-agentcore": { + "Value": "bedrock-agentcore" + }, "bedrock-runtime": { "Value": "bedrock-runtime", "endpoint": { @@ -14678,6 +14681,15 @@ "Value": "HTTPS, HTTP" } }, + "b2bi": { + "Value": "b2bi", + "endpoint": { + "Value": "b2bi.ap-south-2.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "backup": { "Value": "backup", "endpoint": { @@ -19073,6 +19085,15 @@ "Value": "HTTPS" } }, + "b2bi": { + "Value": "b2bi", + "endpoint": { + "Value": "b2bi.ap-southeast-2.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "backup": { "Value": "backup", "endpoint": { @@ -20690,6 +20711,12 @@ "Value": "observabilityadmin.ap-southeast-2.amazonaws.com" } }, + "odb": { + "Value": "odb", + "endpoint": { + "Value": "odb.ap-southeast-2.amazonaws.com" + } + }, "opensearchserverless": { "Value": "opensearchserverless", "endpoint": { @@ -25199,6 +25226,15 @@ "Value": "HTTPS" } }, + "emr-serverless": { + "Value": "emr-serverless", + "endpoint": { + "Value": "emr-serverless.ap-southeast-5.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "es": { "Value": "es", "endpoint": { @@ -26292,6 +26328,15 @@ "Value": "HTTPS" } }, + "bedrock": { + "Value": "bedrock", + "endpoint": { + "Value": "bedrock.ap-southeast-6.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "chatbot": { "Value": "chatbot" }, @@ -26982,6 +27027,15 @@ "Value": "HTTPS, HTTP" } }, + "socialmessaging": { + "Value": "socialmessaging", + "endpoint": { + "Value": "social-messaging.ap-southeast-6.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "sqs": { "Value": "sqs", "endpoint": { @@ -28631,6 +28685,15 @@ "awstransform": { "Value": "awstransform" }, + "b2bi": { + "Value": "b2bi", + "endpoint": { + "Value": "b2bi.ca-central-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "backup": { "Value": "backup", "endpoint": { @@ -28667,6 +28730,9 @@ "Value": "HTTPS" } }, + "bedrock-agentcore": { + "Value": "bedrock-agentcore" + }, "bedrock-runtime": { "Value": "bedrock-runtime", "endpoint": { @@ -32054,6 +32120,15 @@ "Value": "HTTPS, HTTP" } }, + "socialmessaging": { + "Value": "socialmessaging", + "endpoint": { + "Value": "social-messaging.ca-west-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "sqs": { "Value": "sqs", "endpoint": { @@ -35434,6 +35509,15 @@ "Value": "HTTPS" } }, + "b2bi": { + "Value": "b2bi", + "endpoint": { + "Value": "b2bi.eu-central-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "backup": { "Value": "backup", "endpoint": { @@ -39842,6 +39926,9 @@ "Value": "HTTPS" } }, + "bedrock-agentcore": { + "Value": "bedrock-agentcore" + }, "bedrock-runtime": { "Value": "bedrock-runtime", "endpoint": { @@ -41522,6 +41609,15 @@ "Value": "HTTPS, HTTP" } }, + "socialmessaging": { + "Value": "socialmessaging", + "endpoint": { + "Value": "social-messaging.eu-north-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "sqs": { "Value": "sqs", "endpoint": { @@ -48516,6 +48612,9 @@ "Value": "HTTPS" } }, + "bedrock-agentcore": { + "Value": "bedrock-agentcore" + }, "bedrock-data-automation": { "Value": "bedrock-data-automation", "endpoint": { @@ -51108,6 +51207,15 @@ "Value": "HTTPS, HTTP" } }, + "b2bi": { + "Value": "b2bi", + "endpoint": { + "Value": "b2bi.eu-west-3.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "backup": { "Value": "backup", "endpoint": { @@ -51144,6 +51252,9 @@ "Value": "HTTPS" } }, + "bedrock-agentcore": { + "Value": "bedrock-agentcore" + }, "bedrock-runtime": { "Value": "bedrock-runtime", "endpoint": { @@ -57197,6 +57308,15 @@ "Value": "HTTPS, HTTP" } }, + "socialmessaging": { + "Value": "socialmessaging", + "endpoint": { + "Value": "social-messaging.me-central-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "sqs": { "Value": "sqs", "endpoint": { @@ -58961,6 +59081,15 @@ "Value": "HTTPS, HTTP" } }, + "socialmessaging": { + "Value": "socialmessaging", + "endpoint": { + "Value": "social-messaging.me-south-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "sqs": { "Value": "sqs", "endpoint": { @@ -60207,6 +60336,15 @@ "Value": "HTTPS, HTTP" } }, + "socialmessaging": { + "Value": "socialmessaging", + "endpoint": { + "Value": "social-messaging.mx-central-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "sqs": { "Value": "sqs", "endpoint": { @@ -69299,6 +69437,15 @@ "Value": "HTTPS" } }, + "grafana": { + "Value": "grafana", + "endpoint": { + "Value": "grafana.us-gov-east-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "greengrass": { "Value": "greengrass", "endpoint": { @@ -71022,6 +71169,15 @@ "Value": "HTTPS" } }, + "grafana": { + "Value": "grafana", + "endpoint": { + "Value": "grafana.us-gov-west-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "greengrass": { "Value": "greengrass", "endpoint": { diff --git a/moto/ssm/resources/services.json b/moto/ssm/resources/services.json index 6359f66bd450..873ce655e8e6 100644 --- a/moto/ssm/resources/services.json +++ b/moto/ssm/resources/services.json @@ -8020,6 +8020,42 @@ "Value": "https://aws.amazon.com/b2b-data-interchange/" }, "regions": { + "ap-south-2": { + "Value": "ap-south-2", + "endpoint": { + "Value": "b2bi.ap-south-2.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, + "ap-southeast-2": { + "Value": "ap-southeast-2", + "endpoint": { + "Value": "b2bi.ap-southeast-2.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, + "ca-central-1": { + "Value": "ca-central-1", + "endpoint": { + "Value": "b2bi.ca-central-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, + "eu-central-1": { + "Value": "eu-central-1", + "endpoint": { + "Value": "b2bi.eu-central-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "eu-west-1": { "Value": "eu-west-1", "endpoint": { @@ -8029,6 +8065,15 @@ "Value": "HTTPS" } }, + "eu-west-3": { + "Value": "eu-west-3", + "endpoint": { + "Value": "b2bi.eu-west-3.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "us-east-1": { "Value": "us-east-1", "endpoint": { @@ -9173,6 +9218,15 @@ "Value": "HTTPS" } }, + "ap-southeast-6": { + "Value": "ap-southeast-6", + "endpoint": { + "Value": "bedrock.ap-southeast-6.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "ap-southeast-7": { "Value": "ap-southeast-7", "endpoint": { @@ -9394,6 +9448,9 @@ "ap-northeast-1": { "Value": "ap-northeast-1" }, + "ap-northeast-2": { + "Value": "ap-northeast-2" + }, "ap-south-1": { "Value": "ap-south-1" }, @@ -9403,12 +9460,24 @@ "ap-southeast-2": { "Value": "ap-southeast-2" }, + "ca-central-1": { + "Value": "ca-central-1" + }, "eu-central-1": { "Value": "eu-central-1" }, + "eu-north-1": { + "Value": "eu-north-1" + }, "eu-west-1": { "Value": "eu-west-1" }, + "eu-west-2": { + "Value": "eu-west-2" + }, + "eu-west-3": { + "Value": "eu-west-3" + }, "us-east-1": { "Value": "us-east-1" }, @@ -28005,6 +28074,15 @@ "Value": "HTTPS" } }, + "ap-southeast-5": { + "Value": "ap-southeast-5", + "endpoint": { + "Value": "emr-serverless.ap-southeast-5.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "ca-central-1": { "Value": "ca-central-1", "endpoint": { @@ -34318,6 +34396,24 @@ "Value": "HTTPS" } }, + "us-gov-east-1": { + "Value": "us-gov-east-1", + "endpoint": { + "Value": "grafana.us-gov-east-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, + "us-gov-west-1": { + "Value": "us-gov-west-1", + "endpoint": { + "Value": "grafana.us-gov-west-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "us-west-2": { "Value": "us-west-2", "endpoint": { @@ -52105,6 +52201,12 @@ "Value": "odb.ap-northeast-1.amazonaws.com" } }, + "ap-southeast-2": { + "Value": "ap-southeast-2", + "endpoint": { + "Value": "odb.ap-southeast-2.amazonaws.com" + } + }, "eu-central-1": { "Value": "eu-central-1", "endpoint": { @@ -70474,6 +70576,15 @@ "Value": "HTTPS" } }, + "ap-southeast-6": { + "Value": "ap-southeast-6", + "endpoint": { + "Value": "social-messaging.ap-southeast-6.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "ca-central-1": { "Value": "ca-central-1", "endpoint": { @@ -70483,6 +70594,15 @@ "Value": "HTTPS" } }, + "ca-west-1": { + "Value": "ca-west-1", + "endpoint": { + "Value": "social-messaging.ca-west-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "eu-central-1": { "Value": "eu-central-1", "endpoint": { @@ -70492,6 +70612,15 @@ "Value": "HTTPS" } }, + "eu-north-1": { + "Value": "eu-north-1", + "endpoint": { + "Value": "social-messaging.eu-north-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "eu-south-2": { "Value": "eu-south-2", "endpoint": { @@ -70519,6 +70648,33 @@ "Value": "HTTPS" } }, + "me-central-1": { + "Value": "me-central-1", + "endpoint": { + "Value": "social-messaging.me-central-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, + "me-south-1": { + "Value": "me-south-1", + "endpoint": { + "Value": "social-messaging.me-south-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, + "mx-central-1": { + "Value": "mx-central-1", + "endpoint": { + "Value": "social-messaging.mx-central-1.amazonaws.com" + }, + "protocols": { + "Value": "HTTPS" + } + }, "sa-east-1": { "Value": "sa-east-1", "endpoint": { diff --git a/setup.cfg b/setup.cfg index c64bf51805f9..9cb919c6fce6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,12 +1,12 @@ [metadata] -name = moto +name = moto-ext version = 5.1.21.dev description = A library that allows you to easily mock out tests based on AWS infrastructure long_description = file:README.md long_description_content_type = text/markdown author = Steve Pulec author_email = spulec@gmail.com -url = https://github.com/getmoto/moto +url = https://github.com/localstack/moto license = Apache-2.0 test_suite = tests classifiers = @@ -19,10 +19,6 @@ classifiers = Programming Language :: Python :: 3.14 Topic :: Software Development :: Testing keywords = aws ec2 s3 boto3 mock -project_urls = - Documentation = http://docs.getmoto.org/en/latest/ - Issue tracker = https://github.com/getmoto/moto/issues - Changelog = https://github.com/getmoto/moto/blob/master/CHANGELOG.md [options] python_requires = >=3.9 @@ -46,7 +42,8 @@ moto = py.typed [options.extras_require] all = antlr4-python3-runtime - aws-sam-translator<=1.103.0 + aws-sam-translator<=1.103.0; python_version >= "3.14" + aws-sam-translator>=1.105.0; python_version < "3.14" joserfc>=0.9.0 jsonpath_ng docker>=3.0.0 @@ -63,7 +60,8 @@ all = multipart proxy = antlr4-python3-runtime - aws-sam-translator<=1.103.0 + aws-sam-translator<=1.103.0; python_version >= "3.14" + aws-sam-translator>=1.105.0; python_version < "3.14" joserfc>=0.9.0 jsonpath_ng docker>=2.5.1 @@ -79,7 +77,8 @@ proxy = multipart server = antlr4-python3-runtime - aws-sam-translator<=1.103.0 + aws-sam-translator<=1.103.0; python_version >= "3.14" + aws-sam-translator>=1.105.0; python_version < "3.14" joserfc>=0.9.0 jsonpath_ng docker>=3.0.0 diff --git a/tests/test_ssm/test_ssm_default_amis.py b/tests/test_ssm/test_ssm_default_amis.py index a3c286590dcc..419a49c42c6a 100644 --- a/tests/test_ssm/test_ssm_default_amis.py +++ b/tests/test_ssm/test_ssm_default_amis.py @@ -1,4 +1,5 @@ import boto3 +import pytest from moto import mock_aws @@ -6,8 +7,16 @@ @mock_aws -def test_ssm_get_latest_ami_by_path(): - client = boto3.client("ssm", region_name="us-west-1") +@pytest.mark.parametrize( + "partition,region", + [ + ("aws", "us-west-1"), + ("aws-us-gov", "us-gov-east-1"), + ("aws-us-gov", "us-gov-west-1"), + ], +) +def test_ssm_get_latest_ami_by_path(partition, region): + client = boto3.client("ssm", region_name=region) path = "/aws/service/ami-amazon-linux-latest" params = client.get_parameters_by_path(Path=path)["Parameters"] assert len(params) == 10 @@ -17,7 +26,7 @@ def test_ssm_get_latest_ami_by_path(): ) assert all(p["Type"] == "String" for p in params) assert all(p["DataType"] == "text" for p in params) - assert all(p["ARN"].startswith("arn:aws:ssm:us-west-1") for p in params) + assert all(p["ARN"].startswith(f"arn:{partition}:ssm:{region}") for p in params) @mock_aws diff --git a/tests/test_ssm/test_ssm_parameterstore.py b/tests/test_ssm/test_ssm_parameterstore.py index 1d0ebf01cd3f..77ff65a4e905 100644 --- a/tests/test_ssm/test_ssm_parameterstore.py +++ b/tests/test_ssm/test_ssm_parameterstore.py @@ -1,3 +1,5 @@ +import pytest + from moto.ssm.models import ParameterDict @@ -83,3 +85,17 @@ def test_ssm_parameter_from_unknown_region(): "/aws/service/ami-amazon-linux-latest", recursive=False ) ) + + +@pytest.mark.parametrize("region", ["us-gov-east-1", "us-gov-west-1"]) +def test_ssm_parameter_from_gov_cloud_east_region(region): + store = ParameterDict("000000000000", region) + keys = list( + store.get_keys_beginning_with( + "/aws/service/ami-amazon-linux-latest", recursive=False + ) + ) + for key in keys: + ssm_parameter = store.get(key)[0] + ami = ssm_parameter.value + assert ami.startswith("ami-")