Skip to content

feat: Expose ECR image to use in other services - like AWS Batch #6304

@MengLinMaker

Description

@MengLinMaker

I would be great to abstract away some implementation jank to gain access to ECR images. This would provide a much better default developer experience.

For context, I'm deploying AWS Batch using SST which requires uploading images to ECR - refer to #6244

This is the current solution - requiring a janky workarounds to find the location and name of dockerfile

import * as pulumi from '@pulumi/pulumi'
import path from 'node:path'

const Repository = new awsx.ecr.Repository('Repository')

// Need to get out of the '.sst/platform' folder to context folder 'src'
const contextPath = '../../src'

// Specify context and dockerfile name to avoid path issues with SST
const Image = new awsx.ecr.Image('Image', {
    repositoryUrl: Repository.url,
    dockerfile: path.join(contextPath, 'dockerfile'),
    context: path.join(contextPath),
})

I'm also using the awsx provider.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions