Skip to content

Commit

Permalink
Merge pull request #158 from cisagov/improvement/use_sesv2_client
Browse files Browse the repository at this point in the history
Use the `sesv2` `boto3` client
  • Loading branch information
mcdonnnj authored Oct 12, 2024
2 parents ce274e2 + 3fc00e7 commit fd062ec
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ hosted [here](https://www.dhs.gov/code.json).
To run the `cisagov/code-gov-update` image via Docker:

```console
docker run cisagov/code-gov-update:0.1.7
docker run cisagov/code-gov-update:0.2.0
```

### Running with Docker Compose ###
Expand All @@ -44,7 +44,7 @@ docker run cisagov/code-gov-update:0.1.7

services:
update:
image: 'cisagov/code-gov-update:0.1.7'
image: 'cisagov/code-gov-update:0.2.0'
init: true
environment:
- AWS_CONFIG_FILE=path/to/aws_config
Expand Down Expand Up @@ -92,7 +92,7 @@ environment variables. See the
services:
update:
image: 'cisagov/code-gov-update:0.1.7'
image: 'cisagov/code-gov-update:0.2.0'
init: true
secrets:
- source: aws_config
Expand Down Expand Up @@ -131,7 +131,7 @@ environment variables. See the
1. Pull the new image:

```console
docker pull cisagov/code-gov-update:0.1.7
docker pull cisagov/code-gov-update:0.2.0
```

1. Recreate and run the container by following the [previous instructions](#running-with-docker).
Expand All @@ -140,12 +140,12 @@ environment variables. See the

The images of this container are tagged with [semantic
versions](https://semver.org). It is recommended that most users use a version
tag (e.g. `:0.1.7`).
tag (e.g. `:0.2.0`).

| Image:tag | Description |
|-----------|-------------|
|`cisagov/code-gov-update:0.1.7`| An exact release version. |
|`cisagov/code-gov-update:0.1`| The most recent release matching the major and minor version numbers. |
|`cisagov/code-gov-update:0.2.0`| An exact release version. |
|`cisagov/code-gov-update:0.2`| The most recent release matching the major and minor version numbers. |
|`cisagov/code-gov-update:0`| The most recent release matching the major version number. |
|`cisagov/code-gov-update:edge` | The most recent image built from a merge into the `develop` branch of this repository. |
|`cisagov/code-gov-update:nightly` | A nightly build of the `develop` branch of this repository. |
Expand Down Expand Up @@ -209,7 +209,7 @@ Build the image locally using this git repository as the [build context](https:/

```console
docker build \
--tag cisagov/code-gov-update:0.1.7 \
--tag cisagov/code-gov-update:0.2.0 \
https://github.com/cisagov/code-gov-update.git#develop
```

Expand Down Expand Up @@ -240,7 +240,7 @@ Docker:
--file Dockerfile-x \
--platform linux/amd64 \
--output type=docker \
--tag cisagov/code-gov-update:0.1.7 .
--tag cisagov/code-gov-update:0.2.0 .
```

## Contributing ##
Expand Down
4 changes: 2 additions & 2 deletions src/email-update.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ def main():
msg.attach(json_part)

# Send the email
ses_client = boto3.client("ses")
response = ses_client.send_raw_email(RawMessage={"Data": msg.as_string()})
ses_client = boto3.client("sesv2")
response = ses_client.send_email(Content={"Raw": {"Data": msg.as_string()}})
# Check for errors
status_code = response["ResponseMetadata"]["HTTPStatusCode"]
if status_code != 200:
Expand Down
2 changes: 1 addition & 1 deletion src/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.7"
__version__ = "0.2.0"

0 comments on commit fd062ec

Please sign in to comment.